diff --git a/.github/workflows/monitoring.yml b/.github/workflows/monitoring.yml index e322a5aee..c6df076c7 100644 --- a/.github/workflows/monitoring.yml +++ b/.github/workflows/monitoring.yml @@ -52,7 +52,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: "14.x" + node-version: "18.x" cache: "yarn" cache-dependency-path: monitoring/yarn.lock @@ -133,7 +133,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: "14.x" + node-version: "18.x" cache: "yarn" cache-dependency-path: monitoring/yarn.lock diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index d92c23f53..1c2866943 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -4,8 +4,7 @@ anyone, and even the smallest of fixes is appreciated! The following is a set of guidelines for contributing to Keep and its packages. -These are mostly guidelines, not rules. Use your best judgment, and feel free to -propose changes to this document in a pull request. +Feel free to propose changes to this document in a pull request. == Getting started @@ -55,3 +54,33 @@ Solidity linting, please propose these changes to our https://github.com/keep-network/solium-config-keep[solium-config-keep] and https://github.com/keep-network/eslint-config-keep[eslint-config-keep] packages. All other packages have it as a dependency. + +== Commit Messages + +When composing commit messages, please follow the general guidelines listed in +https://cbea.ms/git-commit/[Chris Beams’s How to Write a Git Commit Message]. +Many editors have git modes that will highlight overly long first lines of +commit messages, etc. The GitHub UI itself will warn you if your commit summary +is too long, and will auto-wrap commit messages made through the UI to 72 +characters. + +The above goes into good commit style. Some additional guidelines do apply, +however: + +* The target audience of your commit messages is always "some person 10 years + from now who never got a chance to talk to present you" (that person could be + future you!). +* Commit messages with a summary and no description should be very rare. This + means you should probably break any habit of using `git commit -m`. +* A fundamental principle that informs our use of GitHub: assume GitHub will + someday go away, and ensure git has captured all important information about + the development of the code. Commit messages are the piece of knowledge that + is second most likely to survive tool transitions (the first is the code + itself); as such, they must stand alone. Do not reference tickets or issues + in your commit messages. Summarize any conclusions from the issue or ticket + that inform the commit itself, and capture any additional reasoning or context + in the merge commit. +* Make your commits as atomic as you can manage. This means each commit contains + a single logical unit of work. +* Run a quick `git log --graph --all --oneline --decorate` before pushing. + It’s much easier to fix typos and minor mistakes locally. diff --git a/monitoring/Dockerfile b/monitoring/Dockerfile index 2212d741e..5159ba27d 100644 --- a/monitoring/Dockerfile +++ b/monitoring/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14-alpine as builder +FROM node:18-alpine as builder # Add packages necessary to perform the build process. RUN apk add --update --no-cache \ @@ -25,7 +25,6 @@ COPY tsconfig.json ./ COPY src ./src RUN yarn install --frozen-lockfile --ignore-scripts -RUN yarn run postinstall RUN yarn build @@ -33,12 +32,11 @@ RUN yarn build RUN rm -rf ./node_modules RUN rm -rf ./external RUN yarn install --production --frozen-lockfile --ignore-scripts -RUN yarn run postinstall # Prune other unnecessary files from dependencies using node-prune. RUN node-prune -FROM node:14-alpine as runner +FROM node:18-alpine as runner WORKDIR /monitoring diff --git a/monitoring/package.json b/monitoring/package.json index 2eb71cd1b..e5067308d 100644 --- a/monitoring/package.json +++ b/monitoring/package.json @@ -9,13 +9,10 @@ "format": "yarn run lint && prettier --check .", "format:fix": "yarn run lint:fix && prettier --write .", "lint": "eslint . --ext .js,.ts", - "lint:fix": "eslint . --ext .js,.ts --fix", - "postinstall": "npm rebuild bcrypto" + "lint:fix": "eslint . --ext .js,.ts --fix" }, "dependencies": { - "@keep-network/tbtc-v2-mainnet": "npm:@keep-network/tbtc-v2@mainnet", - "@keep-network/tbtc-v2-testnet": "npm:@keep-network/tbtc-v2@sepolia", - "@keep-network/tbtc-v2.ts": "1.4.0-dev.1", + "@keep-network/tbtc-v2.ts": "v2.5.0-dev.5", "@sentry/node": "^7.33.0", "axios": "^1.3.2", "ethers": "^5.5.2", @@ -29,6 +26,6 @@ "typescript": "^4.9.5" }, "engines": { - "node": ">=14 <15" + "node": ">=16" } } diff --git a/monitoring/src/block-explorer.ts b/monitoring/src/block-explorer.ts index bb9704480..94b17cb93 100644 --- a/monitoring/src/block-explorer.ts +++ b/monitoring/src/block-explorer.ts @@ -1,6 +1,6 @@ import { context, Environment } from "./context" -import type { BitcoinTransactionHash, Hex } from "@keep-network/tbtc-v2.ts" +import type { BitcoinTxHash, Hex } from "@keep-network/tbtc-v2.ts" const ethTxUrlPrefixMapping = { [Environment.Mainnet]: "https://etherscan.io/tx", @@ -18,6 +18,6 @@ const btcTxUrlPrefixMapping = { [Environment.Testnet]: "https://mempool.space/testnet/tx", } -export function createBtcTxUrl(txHash: BitcoinTransactionHash) { +export function createBtcTxUrl(txHash: BitcoinTxHash) { return `${btcTxUrlPrefixMapping[context.environment]}/${txHash.toString()}` } diff --git a/monitoring/src/blocks.ts b/monitoring/src/blocks.ts new file mode 100644 index 000000000..a8259c404 --- /dev/null +++ b/monitoring/src/blocks.ts @@ -0,0 +1,21 @@ +import { providers } from "ethers" + +import { context } from "./context" + +const resolve = () => { + const provider = new providers.JsonRpcProvider(context.ethereumUrl) + + const latestBlock = async () => { + const block = await provider.getBlock("latest") + return block.number + } + + const blockTimestamp = async (blockNumber: number): Promise => { + const block = await provider.getBlock(blockNumber) + return block.timestamp + } + + return { latestBlock, blockTimestamp } +} + +export const blocks = resolve() diff --git a/monitoring/src/context.ts b/monitoring/src/context.ts index a153d5abf..a8d6f5780 100644 --- a/monitoring/src/context.ts +++ b/monitoring/src/context.ts @@ -1,3 +1,5 @@ +import { BitcoinNetwork, Chains } from "@keep-network/tbtc-v2.ts" + // List of environment variables used by the monitoring package. const { ENVIRONMENT, @@ -15,6 +17,16 @@ export enum Environment { Testnet = "testnet", } +const ethereumEnvironmentMapping = { + [Environment.Mainnet]: Chains.Ethereum.Mainnet, + [Environment.Testnet]: Chains.Ethereum.Sepolia, +} + +const bitcoinEnvironmentMapping = { + [Environment.Mainnet]: BitcoinNetwork.Mainnet, + [Environment.Testnet]: BitcoinNetwork.Testnet, +} + const resolveEnvironment = () => { switch (ENVIRONMENT) { case Environment.Mainnet: { @@ -57,4 +69,6 @@ export const context = { dataDirPath: DATA_DIR_PATH ?? "./data", sentryDsn: SENTRY_DSN, discordWebhookUrl: DISCORD_WEBHOOK_URL, + ethereumEnvironmentMapping, + bitcoinEnvironmentMapping, } diff --git a/monitoring/src/contracts.ts b/monitoring/src/contracts.ts deleted file mode 100644 index 7e82e34e3..000000000 --- a/monitoring/src/contracts.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { - EthereumBridge, - EthereumTBTCToken, - EthereumTBTCVault, -} from "@keep-network/tbtc-v2.ts" -import { providers } from "ethers" - -import { context, Environment } from "./context" - -import type { - Bridge, - TBTCVault, - TBTCToken, -} from "@keep-network/tbtc-v2.ts/dist/src/chain" - -const resolve = () => { - let packageName: string - - switch (context.environment) { - case Environment.Mainnet: { - packageName = "@keep-network/tbtc-v2-mainnet" - break - } - case Environment.Testnet: { - packageName = "@keep-network/tbtc-v2-testnet" - break - } - default: { - throw new Error( - `cannot pick tbtc package for ${context.environment} environment` - ) - } - } - - const provider = new providers.JsonRpcProvider(context.ethereumUrl) - - const latestBlock = async () => { - const block = await provider.getBlock("latest") - return block.number - } - - const blockTimestamp = async (blockNumber: number): Promise => { - const block = await provider.getBlock(blockNumber) - return block.timestamp - } - - // eslint-disable-next-line @typescript-eslint/no-var-requires,global-require,import/no-dynamic-require - const bridgeArtifact = require(`${packageName}/artifacts/Bridge.json`) - const bridge: Bridge = new EthereumBridge({ - address: bridgeArtifact.address, - signerOrProvider: provider, - deployedAtBlockNumber: bridgeArtifact.receipt.blockNumber, - }) - - // eslint-disable-next-line @typescript-eslint/no-var-requires,global-require,import/no-dynamic-require - const tbtcVaultArtifact = require(`${packageName}/artifacts/TBTCVault.json`) - const tbtcVault: TBTCVault = new EthereumTBTCVault({ - address: tbtcVaultArtifact.address, - signerOrProvider: provider, - deployedAtBlockNumber: tbtcVaultArtifact.receipt.blockNumber, - }) - - // eslint-disable-next-line @typescript-eslint/no-var-requires,global-require,import/no-dynamic-require - const tbtcTokenArtifact = require(`${packageName}/artifacts/TBTC.json`) - const tbtcToken: TBTCToken = new EthereumTBTCToken({ - address: tbtcTokenArtifact.address, - signerOrProvider: provider, - deployedAtBlockNumber: tbtcTokenArtifact.receipt.blockNumber, - }) - - return { bridge, tbtcVault, tbtcToken, latestBlock, blockTimestamp } -} - -export const contracts = resolve() diff --git a/monitoring/src/deposit-monitor.ts b/monitoring/src/deposit-monitor.ts index f11a1e8e2..4e1c4eb2a 100644 --- a/monitoring/src/deposit-monitor.ts +++ b/monitoring/src/deposit-monitor.ts @@ -5,8 +5,10 @@ import { context } from "./context" import { createBtcTxUrl, createEthTxUrl } from "./block-explorer" import type { SystemEvent, Monitor as SystemEventMonitor } from "./system-event" -import type { DepositRevealedEvent as DepositRevealedChainEvent } from "@keep-network/tbtc-v2.ts/dist/src/deposit" -import type { Bridge } from "@keep-network/tbtc-v2.ts/dist/src/chain" +import type { + Bridge, + DepositRevealedEvent as DepositRevealedChainEvent, +} from "@keep-network/tbtc-v2.ts" export const satsToRoundedBTC = (sats: BigNumber): string => (sats.div(BigNumber.from(1e6)).toNumber() / 100).toFixed(2) diff --git a/monitoring/src/index.ts b/monitoring/src/index.ts index a382e3b19..f9746921d 100644 --- a/monitoring/src/index.ts +++ b/monitoring/src/index.ts @@ -1,8 +1,12 @@ -import { ElectrumClient } from "@keep-network/tbtc-v2.ts" +import { + ElectrumClient, + loadEthereumCoreContracts, + TBTC, +} from "@keep-network/tbtc-v2.ts" +import { providers } from "ethers" import { Manager as SystemEventManager } from "./system-event" import { DepositMonitor } from "./deposit-monitor" -import { contracts } from "./contracts" import { DiscordReceiver } from "./discord-receiver" import { SentryReceiver } from "./sentry-receiver" import { @@ -15,53 +19,90 @@ import { WalletMonitor } from "./wallet-monitor" import { SupplyMonitor } from "./supply-monitor" import { RedemptionMonitor } from "./redemption-monitor" -import type { Client as BitcoinClient } from "@keep-network/tbtc-v2.ts/dist/src/bitcoin" import type { Monitor as SystemEventMonitor, Receiver as SystemEventReceiver, } from "./system-event" -const btcClient: BitcoinClient = ElectrumClient.fromUrl(context.electrumUrl) +async function setupSDK(): Promise { + const provider = new providers.JsonRpcProvider(context.ethereumUrl) + const chainId = context.ethereumEnvironmentMapping[context.environment] + const tbtcContracts = await loadEthereumCoreContracts(provider, chainId) -const monitors: SystemEventMonitor[] = [ - new DepositMonitor(contracts.bridge), - new MintingMonitor(contracts.bridge, contracts.tbtcVault, btcClient), - new SupplyMonitor(contracts.tbtcToken, new SupplyMonitorFilePersistence()), - new WalletMonitor(contracts.bridge), - new RedemptionMonitor(contracts.bridge), -] + const bitcoinNetwork = context.bitcoinEnvironmentMapping[context.environment] + const btcClient = ElectrumClient.fromUrl(context.electrumUrl) + if ((await btcClient.getNetwork()) !== bitcoinNetwork) { + throw new Error("Bitcoin network mismatch") + } -const receivers: SystemEventReceiver[] = ((): SystemEventReceiver[] => { - const registered: SystemEventReceiver[] = [] + return TBTC.initializeCustom(tbtcContracts, btcClient) +} - if (context.discordWebhookUrl) { - console.log("registered Discord receiver") - registered.push(new DiscordReceiver(context.discordWebhookUrl)) - } +async function setupMonitoring(sdk: TBTC): Promise { + const { tbtcContracts, bitcoinClient } = sdk - if (context.sentryDsn) { - console.log("registered Sentry receiver") - registered.push(new SentryReceiver(context.sentryDsn)) - } + const monitors: SystemEventMonitor[] = [ + new DepositMonitor(tbtcContracts.bridge), + new MintingMonitor( + tbtcContracts.bridge, + tbtcContracts.tbtcVault, + bitcoinClient + ), + new SupplyMonitor( + tbtcContracts.tbtcToken, + new SupplyMonitorFilePersistence() + ), + new WalletMonitor(tbtcContracts.bridge), + new RedemptionMonitor(tbtcContracts.bridge), + ] - return registered -})() + const receivers: SystemEventReceiver[] = ((): SystemEventReceiver[] => { + const registered: SystemEventReceiver[] = [] -const manager = new SystemEventManager( - monitors, - receivers, - new SystemEventFilePersistence() -) + if (context.discordWebhookUrl) { + // eslint-disable-next-line no-console + console.log("registered Discord receiver") + registered.push(new DiscordReceiver(context.discordWebhookUrl)) + } -manager.trigger().then((report) => { - switch (report.status) { - case "success": { - console.log(report) - break + if (context.sentryDsn) { + // eslint-disable-next-line no-console + console.log("registered Sentry receiver") + registered.push(new SentryReceiver(context.sentryDsn)) } - case "failure": { - console.error(report) - break + + return registered + })() + + return new SystemEventManager( + monitors, + receivers, + new SystemEventFilePersistence() + ) +} + +async function setup(): Promise { + const sdk = await setupSDK() + return setupMonitoring(sdk) +} + +setup().then((manager) => { + // eslint-disable-next-line no-console + console.log("setup completed; triggering monitoring manager") + + manager.trigger().then((report) => { + // eslint-disable-next-line default-case + switch (report.status) { + case "success": { + // eslint-disable-next-line no-console + console.log(report) + break + } + case "failure": { + // eslint-disable-next-line no-console + console.error(report) + break + } } - } + }) }) diff --git a/monitoring/src/minting-monitor.ts b/monitoring/src/minting-monitor.ts index d24fee936..7620c701b 100644 --- a/monitoring/src/minting-monitor.ts +++ b/monitoring/src/minting-monitor.ts @@ -1,20 +1,16 @@ -import { OptimisticMinting } from "@keep-network/tbtc-v2.ts" - import { SystemEventType } from "./system-event" import type { + BitcoinTxHash, + Bridge, + BitcoinClient, + ChainIdentifier, + TBTCVault, + DepositRevealedEvent as DepositRevealedChainEvent, OptimisticMintingCancelledEvent as OptimisticMintingCancelledChainEvent, OptimisticMintingRequestedEvent as OptimisticMintingRequestedChainEvent, OptimisticMintingFinalizedEvent as OptimisticMintingFinalizedChainEvent, -} from "@keep-network/tbtc-v2.ts/dist/src/optimistic-minting" -import type { DepositRevealedEvent as DepositRevealedChainEvent } from "@keep-network/tbtc-v2.ts/dist/src/deposit" -import type { - Bridge, - Identifier, - TBTCVault, -} from "@keep-network/tbtc-v2.ts/dist/src/chain" -import type { Client as BitcoinClient } from "@keep-network/tbtc-v2.ts/dist/src/bitcoin" -import type { BitcoinTransactionHash } from "@keep-network/tbtc-v2.ts" +} from "@keep-network/tbtc-v2.ts" import type { SystemEvent, Monitor as SystemEventMonitor } from "./system-event" import type { BigNumber } from "ethers" @@ -105,7 +101,7 @@ const OptimisticMintingRequestedForUndeterminedBtcTx = ( const OptimisticMintingNotRequestedByDesignatedMinter = ( chainEvent: OptimisticMintingRequestedChainEvent, - designatedMinter: Identifier + designatedMinter: ChainIdentifier ): SystemEvent => ({ title: "Optimistic minting not requested by designated minter", type: SystemEventType.Warning, @@ -124,7 +120,7 @@ const OptimisticMintingNotRequestedByDesignatedMinter = ( const OptimisticMintingNotFinalizedByDesignatedMinter = ( chainEvent: OptimisticMintingFinalizedChainEvent, - designatedMinter: Identifier | "unknown", + designatedMinter: ChainIdentifier | "unknown", designatedMinterUnknownCause: string ): SystemEvent => ({ title: "Optimistic minting not finalized by designated minter", @@ -178,7 +174,7 @@ type ChainDataCache = { mintingCancelledEvents: OptimisticMintingCancelledChainEvent[] mintingRequestedEvents: OptimisticMintingRequestedChainEvent[] mintingFinalizedEvents: OptimisticMintingFinalizedChainEvent[] - minters: Identifier[] + minters: ChainIdentifier[] optimisticMintingDelay: number } @@ -347,7 +343,7 @@ export class MintingMonitor implements SystemEventMonitor { OptimisticMintingFinalizedChainEvent & { // Minter designated for finalization. In case the minter cannot be // determined for whatever reason, the value will be 'unknown'. - designatedMinter: Identifier | "unknown" + designatedMinter: ChainIdentifier | "unknown" // If the designatedMinter is 'unknown', this field holds the cause // explaining why the minter could not be determined. designatedMinterUnknownCause: string @@ -358,7 +354,7 @@ export class MintingMonitor implements SystemEventMonitor { const enrichMintingFinalizedEventFn = async ( mintingFinalizedEvent: OptimisticMintingFinalizedChainEvent ): Promise => { - let designatedMinter: Identifier | "unknown" = "unknown" + let designatedMinter: ChainIdentifier | "unknown" = "unknown" let designatedMinterUnknownCause = "" try { @@ -428,10 +424,10 @@ export class MintingMonitor implements SystemEventMonitor { } private getDesignatedMinter( - minters: Identifier[], - depositor: Identifier, - fundingTxHash: BitcoinTransactionHash - ): Identifier { + minters: ChainIdentifier[], + depositor: ChainIdentifier, + fundingTxHash: BitcoinTxHash + ): ChainIdentifier { const d = depositor.identifierHex.slice(-1).charCodeAt(0) const f = fundingTxHash.toString().slice(-1).charCodeAt(0) @@ -475,10 +471,9 @@ export class MintingMonitor implements SystemEventMonitor { const mintingRequests = await Promise.allSettled( chainEvents.map((ce) => - OptimisticMinting.getOptimisticMintingRequest( + this.tbtcVault.optimisticMintingRequests( ce.fundingTxHash, - ce.fundingOutputIndex, - this.tbtcVault + ce.fundingOutputIndex ) ) ) @@ -516,10 +511,9 @@ export class MintingMonitor implements SystemEventMonitor { const mintingRequests = await Promise.allSettled( chainEvents.map((ce) => - OptimisticMinting.getOptimisticMintingRequest( + this.tbtcVault.optimisticMintingRequests( ce.fundingTxHash, - ce.fundingOutputIndex, - this.tbtcVault + ce.fundingOutputIndex ) ) ) diff --git a/monitoring/src/redemption-monitor.ts b/monitoring/src/redemption-monitor.ts index 98feb60c9..75350bd1b 100644 --- a/monitoring/src/redemption-monitor.ts +++ b/monitoring/src/redemption-monitor.ts @@ -1,15 +1,16 @@ import { BigNumber } from "ethers" -import { Hex } from "@keep-network/tbtc-v2.ts" import { context } from "./context" import { SystemEventType } from "./system-event" import { satsToRoundedBTC } from "./deposit-monitor" import { createEthTxUrl } from "./block-explorer" -import { contracts } from "./contracts" +import { blocks } from "./blocks" import type { Monitor as SystemEventMonitor, SystemEvent } from "./system-event" -import type { RedemptionRequestedEvent as RedemptionRequestedChainEvent } from "@keep-network/tbtc-v2.ts/dist/src/redemption" -import type { Bridge } from "@keep-network/tbtc-v2.ts/dist/src/chain" +import type { + Bridge, + RedemptionRequestedEvent as RedemptionRequestedChainEvent, +} from "@keep-network/tbtc-v2.ts" // The time after which a pending redemption request is considered stale. // Typically, a redemption request processing time should not exceed 5 hours. @@ -26,8 +27,8 @@ const RedemptionRequested = ( title: "Redemption requested", type: SystemEventType.Informational, data: { - walletPublicKeyHash: chainEvent.walletPublicKeyHash, - redeemerOutputScript: chainEvent.redeemerOutputScript, + walletPublicKeyHash: chainEvent.walletPublicKeyHash.toString(), + redeemerOutputScript: chainEvent.redeemerOutputScript.toString(), requestedAmountBTC: satsToRoundedBTC(chainEvent.requestedAmount), ethRequestTxHash: chainEvent.transactionHash.toPrefixedString(), ethRequestTxHashURL, @@ -45,8 +46,8 @@ const LargeRedemptionRequested = ( title: "Large redemption requested", type: SystemEventType.Warning, data: { - walletPublicKeyHash: chainEvent.walletPublicKeyHash, - redeemerOutputScript: chainEvent.redeemerOutputScript, + walletPublicKeyHash: chainEvent.walletPublicKeyHash.toString(), + redeemerOutputScript: chainEvent.redeemerOutputScript.toString(), requestedAmountBTC: satsToRoundedBTC(chainEvent.requestedAmount), ethRequestTxHash: chainEvent.transactionHash.toPrefixedString(), ethRequestTxHashURL, @@ -64,8 +65,8 @@ const StaleRedemption = ( title: "Stale redemption", type: SystemEventType.Warning, data: { - walletPublicKeyHash: chainEvent.walletPublicKeyHash, - redeemerOutputScript: chainEvent.redeemerOutputScript, + walletPublicKeyHash: chainEvent.walletPublicKeyHash.toString(), + redeemerOutputScript: chainEvent.redeemerOutputScript.toString(), requestedAmountBTC: satsToRoundedBTC(chainEvent.requestedAmount), ethRequestTxHash: chainEvent.transactionHash.toPrefixedString(), ethRequestTxHashURL, @@ -142,33 +143,13 @@ export class RedemptionMonitor implements SystemEventMonitor { }) const chainEventsTimestamps = await Promise.all( - chainEvents.map((ce) => contracts.blockTimestamp(ce.blockNumber)) + chainEvents.map((ce) => blocks.blockTimestamp(ce.blockNumber)) ) - // To fetch pending redemptions requests, we need to know the plain-text - // public keys of the wallets used by the given chain events. In order to - // achieve that, we build a cache where the key is the wallet public key - // hash and the value is the wallet plain text public key. - // - // TODO: This can be optimized by refactoring the Bridge.pendingRedemptions - // method to accept wallet public key hashes directly. - const walletCache = new Map() - // eslint-disable-next-line no-plusplus - for (let i = 0; i < chainEvents.length; i++) { - const { walletPublicKeyHash } = chainEvents[i] - - if (!walletCache.has(walletPublicKeyHash)) { - // eslint-disable-next-line no-await-in-loop - const wallet = await this.bridge.wallets(Hex.from(walletPublicKeyHash)) - walletCache.set(walletPublicKeyHash, wallet.walletPublicKey.toString()) - } - } - const pendingRedemptionsRequests = await Promise.all( chainEvents.map((ce) => - this.bridge.pendingRedemptions( - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - walletCache.get(ce.walletPublicKeyHash)!, + this.bridge.pendingRedemptionsByWalletPKH( + ce.walletPublicKeyHash, ce.redeemerOutputScript ) ) diff --git a/monitoring/src/supply-monitor.ts b/monitoring/src/supply-monitor.ts index 587b281f5..1c8d88fdb 100644 --- a/monitoring/src/supply-monitor.ts +++ b/monitoring/src/supply-monitor.ts @@ -1,7 +1,7 @@ import { SystemEventType } from "./system-event" import type { BigNumber } from "ethers" -import type { TBTCToken } from "@keep-network/tbtc-v2.ts/dist/src/chain" +import type { TBTCToken } from "@keep-network/tbtc-v2.ts" import type { Monitor as SystemEventMonitor, SystemEvent } from "./system-event" // The block span the supply change is checked for. It is 12 hours expressed diff --git a/monitoring/src/system-event.ts b/monitoring/src/system-event.ts index cab600147..dc9750c95 100644 --- a/monitoring/src/system-event.ts +++ b/monitoring/src/system-event.ts @@ -1,4 +1,5 @@ -import { contracts } from "./contracts" +// eslint-disable-next-line max-classes-per-file +import { blocks } from "./blocks" export enum SystemEventType { Informational = "informational", @@ -145,7 +146,7 @@ export class Manager { async trigger(): Promise { try { const checkpointBlock = await this.persistence.checkpointBlock() - const latestBlock = await contracts.latestBlock() + const latestBlock = await blocks.latestBlock() const validCheckpoint = checkpointBlock > 0 && checkpointBlock < latestBlock diff --git a/monitoring/src/wallet-monitor.ts b/monitoring/src/wallet-monitor.ts index ebd920ac3..128be5134 100644 --- a/monitoring/src/wallet-monitor.ts +++ b/monitoring/src/wallet-monitor.ts @@ -1,15 +1,13 @@ import { SystemEventType } from "./system-event" import type { + Bridge, + WalletRegistry, NewWalletRegisteredEvent as WalletRegisteredChainEvent, DkgResultSubmittedEvent as DkgResultSubmittedChainEvent, DkgResultApprovedEvent as DkgResultApprovedChainEvent, DkgResultChallengedEvent as DkgResultChallengedChainEvent, -} from "@keep-network/tbtc-v2.ts/dist/src/wallet" -import type { - Bridge, - WalletRegistry, -} from "@keep-network/tbtc-v2.ts/dist/src/chain" +} from "@keep-network/tbtc-v2.ts" import type { SystemEvent, Monitor as SystemEventMonitor } from "./system-event" const WalletRegistered = ( diff --git a/monitoring/yarn.lock b/monitoring/yarn.lock index efa9606e7..21f53e610 100644 --- a/monitoring/yarn.lock +++ b/monitoring/yarn.lock @@ -9,6 +9,14 @@ dependencies: regenerator-runtime "^0.13.11" +"@bitcoinerlab/secp256k1@^1.0.5": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@bitcoinerlab/secp256k1/-/secp256k1-1.1.1.tgz#938305c30505b67b15f3de53627bc9d8b4cc7680" + integrity sha512-uhjW51WfVLpnHN7+G0saDcM/k9IqcyTbZ+bDgLF3AX8V/a3KXSE9vn7UPBrcdU72tp0J4YPR7BHp2m7MLAZ/1Q== + dependencies: + "@noble/hashes" "^1.1.5" + "@noble/secp256k1" "^1.7.1" + "@celo/base@1.5.2": version "1.5.2" resolved "https://registry.yarnpkg.com/@celo/base/-/base-1.5.2.tgz#168ab5e4e30b374079d8d139fafc52ca6bfd4100" @@ -547,55 +555,16 @@ resolved "https://registry.yarnpkg.com/@keep-network/bitcoin-spv-sol/-/bitcoin-spv-sol-3.4.0-solc-0.8.tgz#8b44c246ffab8ea993efe196f6bf385b1a3b84dc" integrity sha512-KlpY9BbasyLvYXSS7dsJktgRChu/yjdFLOX8ldGA/pltLicCm/l0F4oqxL8wSws9XD12vq9x0B5qzPygVLB2TQ== -"@keep-network/ecdsa@2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@keep-network/ecdsa/-/ecdsa-2.0.0.tgz#96d301cd272e61334bec173b5c4945758fc80853" - integrity sha512-KXSUOkZIKHR3I4H99CpgkPtuneI9AxgGo8+DmqGR56QB28kJCEXm7GC/yTInWS1lb7LzDwkjIm9VYAIGdLrsZw== +"@keep-network/ecdsa@2.1.0-dev.19": + version "2.1.0-dev.19" + resolved "https://registry.yarnpkg.com/@keep-network/ecdsa/-/ecdsa-2.1.0-dev.19.tgz#749af8bd65f70135d1734f7c5f9bff82ae308fdb" + integrity sha512-cyqRqK/sOqyaXZWY/O9ij6EINQuJ+bHLMiuufOFyP5YCj4GCuNqOcCytGAZPT+mED/0J/xn0vm+fgiCBq/uJkQ== dependencies: - "@keep-network/random-beacon" "2.0.0" - "@keep-network/sortition-pools" "2.0.0" - "@openzeppelin/contracts" "^4.6.0" - "@openzeppelin/contracts-upgradeable" "^4.6.0" - "@threshold-network/solidity-contracts" "1.2.1" - -"@keep-network/ecdsa@2.1.0-dev.15": - version "2.1.0-dev.15" - resolved "https://registry.yarnpkg.com/@keep-network/ecdsa/-/ecdsa-2.1.0-dev.15.tgz#ee631a42e165f30c75aae8c54aace765b77e272a" - integrity sha512-iUE3SwDSNc/k1oui7Z+fDGhhGyOzpe4/f/oKvDUMHqXx0BQG3QCrOz9KqWuPFXTXMav4LxLbt12WyDITAl/hjw== - dependencies: - "@keep-network/random-beacon" "2.1.0-dev.15" + "@keep-network/random-beacon" "2.1.0-dev.18" "@keep-network/sortition-pools" "^2.0.0-pre.16" "@openzeppelin/contracts" "^4.6.0" "@openzeppelin/contracts-upgradeable" "^4.6.0" - "@threshold-network/solidity-contracts" "1.3.0-dev.6" - -"@keep-network/ecdsa@2.1.0-sepolia.1": - version "2.1.0-sepolia.1" - resolved "https://registry.yarnpkg.com/@keep-network/ecdsa/-/ecdsa-2.1.0-sepolia.1.tgz#6e985148ade6415013e5d8cbca167d029c7b0c2c" - integrity sha512-WWG8Y1NW3nh30AShvFtVT+qijLUYuQNfWDox28DAv5KrgX9Od3a/l1HkRWA3qHEdakHqZ/ZDdR5/bGliT11PwQ== - dependencies: - "@keep-network/random-beacon" "2.1.0-sepolia.1" - "@keep-network/sortition-pools" "github:keep-network/sortition-pools#test-fork" - "@openzeppelin/contracts" "^4.6.0" - "@openzeppelin/contracts-upgradeable" "^4.6.0" - "@threshold-network/solidity-contracts" "1.3.0-sepolia.0" - -"@keep-network/keep-core@1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@keep-network/keep-core/-/keep-core-1.3.0.tgz#09c1fd4d8d021b2afdff4801c7743d4c65b7bce3" - integrity sha512-c8efKWPx5da6OSdcm9/uvdDqrfwDcYAExNqPvomhLFC0dATEEFHsr/QOAqiBm4wCZZtWMKt0dYTm5QpGtx5TXQ== - dependencies: - "@openzeppelin/contracts-ethereum-package" "^2.4.0" - "@openzeppelin/upgrades" "^2.7.2" - openzeppelin-solidity "2.4.0" - -"@keep-network/keep-core@1.7.0": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@keep-network/keep-core/-/keep-core-1.7.0.tgz#0923d539fc431810bd9b239f91e09a92a2b255a0" - integrity sha512-jU0ol4L5a7vFUXCTlYGsjZYhl87cUpiAYz9LgDgvM3sGmwNIVZ9dY3gziINXIbSSFZjoqh3eGDxDPcQmA+Rjrg== - dependencies: - "@openzeppelin/upgrades" "^2.7.2" - openzeppelin-solidity "2.4.0" + "@threshold-network/solidity-contracts" "1.3.0-dev.12" "@keep-network/keep-core@1.8.1-goerli.0": version "1.8.1-goerli.0" @@ -605,14 +574,6 @@ "@openzeppelin/upgrades" "^2.7.2" openzeppelin-solidity "2.4.0" -"@keep-network/keep-core@1.8.1-sepolia.0": - version "1.8.1-sepolia.0" - resolved "https://registry.yarnpkg.com/@keep-network/keep-core/-/keep-core-1.8.1-sepolia.0.tgz#62fc477ea0f5c0a44f67eefbdc1219fbe261b4c3" - integrity sha512-dHdZQR/PWO7Cw8M/GawmsJ5mhaiBOTdd4cUb1DF9fEjUY/4AVrd2F7c39CkrqGCF598ve46hhQWoRLLgtiAv2A== - dependencies: - "@openzeppelin/upgrades" "^2.7.2" - openzeppelin-solidity "2.4.0" - "@keep-network/keep-core@>1.8.1-dev <1.8.1-goerli": version "1.8.1-dev.0" resolved "https://registry.yarnpkg.com/@keep-network/keep-core/-/keep-core-1.8.1-dev.0.tgz#d95864b25800214de43d8840376a68336cb12055" @@ -621,26 +582,6 @@ "@openzeppelin/upgrades" "^2.7.2" openzeppelin-solidity "2.4.0" -"@keep-network/keep-ecdsa@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@keep-network/keep-ecdsa/-/keep-ecdsa-1.2.1.tgz#5dcbc2c3808cce55a6e0d9e524868a0e9a0f1562" - integrity sha512-Oz0thgLoemt/nK6dl+MONU7TEoNR3lfbnMY/Aa0oWGcwR5PlNMiBVzYY7OT4oLZIK/MxEHDOWRQAijZEQffI7g== - dependencies: - "@keep-network/keep-core" "1.3.0" - "@keep-network/sortition-pools" "1.1.2" - "@openzeppelin/upgrades" "^2.7.2" - openzeppelin-solidity "2.3.0" - -"@keep-network/keep-ecdsa@1.9.0-sepolia.0": - version "1.9.0-sepolia.0" - resolved "https://registry.yarnpkg.com/@keep-network/keep-ecdsa/-/keep-ecdsa-1.9.0-sepolia.0.tgz#33d0fcf512193d2b701e92efcfa08de97064f779" - integrity sha512-+hWE8ZzafsElA6xTrVK/XbEpomhiPJDzKO085OJ5GJE6qzx/MGZ5J+EwD3KR+5/1+K+gtVwowF/Q39pgj+jNoQ== - dependencies: - "@keep-network/keep-core" "1.8.1-sepolia.0" - "@keep-network/sortition-pools" "1.2.0-dev.1" - "@openzeppelin/upgrades" "^2.7.2" - openzeppelin-solidity "2.3.0" - "@keep-network/keep-ecdsa@>1.9.0-dev <1.9.0-ropsten": version "1.9.0-goerli.0" resolved "https://registry.yarnpkg.com/@keep-network/keep-ecdsa/-/keep-ecdsa-1.9.0-goerli.0.tgz#ce58b6639062bb4f73a257557aebb16447889e08" @@ -655,52 +596,15 @@ version "0.0.1" resolved "https://codeload.github.com/keep-network/prettier-config-keep/tar.gz/a1a333e7ac49928a0f6ed39421906dd1e46ab0f3" -"@keep-network/random-beacon@2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@keep-network/random-beacon/-/random-beacon-2.0.0.tgz#ac52dd03da49ec5b0d39ba85c51de6c4c8f1b1dc" - integrity sha512-c5AodlBkMRTEID7bDE7BA9lqDZcH3AFqOPz5b9f5syy62DnuiMkHTHIEIvdWWCL26m21A4PPyPjw7XirauE/OA== - dependencies: - "@keep-network/sortition-pools" "2.0.0" - "@openzeppelin/contracts" "^4.6.0" - "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - "@threshold-network/solidity-contracts" "1.2.1" - -"@keep-network/random-beacon@2.1.0-dev.15": - version "2.1.0-dev.15" - resolved "https://registry.yarnpkg.com/@keep-network/random-beacon/-/random-beacon-2.1.0-dev.15.tgz#541620c469e3bc75a5d1f7649889540b0e032e9e" - integrity sha512-vxBICRtmqSmJtFU5hZMpwB0alhgKchyMbxk4DtLZ7T2zBjd5tjt3CqeKEk+ON09g7yL1mIxY07InP4okviUK4A== +"@keep-network/random-beacon@2.1.0-dev.18": + version "2.1.0-dev.18" + resolved "https://registry.yarnpkg.com/@keep-network/random-beacon/-/random-beacon-2.1.0-dev.18.tgz#2647731eea35f931afb565988cc8d8cf6a34f6b7" + integrity sha512-UrVq///+jqOLQ5k8/aFvD1ZUMvVe49iS81U8mDoi9A005FiQzKUK9QFKv3Z0h6joG4prF/hlABRTEQ1UA7tgRA== dependencies: "@keep-network/sortition-pools" "^2.0.0-pre.16" "@openzeppelin/contracts" "4.7.3" "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - "@threshold-network/solidity-contracts" "1.3.0-dev.5" - -"@keep-network/random-beacon@2.1.0-dev.16": - version "2.1.0-dev.16" - resolved "https://registry.yarnpkg.com/@keep-network/random-beacon/-/random-beacon-2.1.0-dev.16.tgz#9f2b5c19aa79f6ff1a5498ba7b55eb170463161d" - integrity sha512-o+cG/VDkhUc91W+4bMplYCgOu0twSFICqarpv5k2ES8GcaafaeV8stXGhCxjvHYJjU/sfG8mhlQZhWdZixq+JQ== - dependencies: - "@keep-network/sortition-pools" "^2.0.0-pre.16" - "@openzeppelin/contracts" "4.7.3" - "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - "@threshold-network/solidity-contracts" "1.3.0-dev.6" - -"@keep-network/random-beacon@2.1.0-sepolia.1": - version "2.1.0-sepolia.1" - resolved "https://registry.yarnpkg.com/@keep-network/random-beacon/-/random-beacon-2.1.0-sepolia.1.tgz#3debde13d5f365883d88b3c1d279cc7d21984d58" - integrity sha512-dj6j6/msv1BqMtPbVoLo4cMhbtf4jLhKjkXmJoBXU2KYWW9wBlRB06M4DZPfUhhW8L7/1eaFJJIINATt26wBjA== - dependencies: - "@keep-network/sortition-pools" "github:keep-network/sortition-pools#test-fork" - "@openzeppelin/contracts" "4.7.3" - "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - "@threshold-network/solidity-contracts" "1.3.0-sepolia.0" - -"@keep-network/sortition-pools@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@keep-network/sortition-pools/-/sortition-pools-1.1.2.tgz#cfeb31d574b02d1ae32649df01b87af07229010a" - integrity sha512-bBaKyxkXDc8kJHq3qeESMrJ02m+Wbh6Uz9qUpWn8Zq3aTZaKXRZfGWT+J71OiBlAdyB4WoHZymrddWHkjImHdQ== - dependencies: - "@openzeppelin/contracts" "^2.4.0" + "@threshold-network/solidity-contracts" "1.3.0-dev.11" "@keep-network/sortition-pools@1.2.0-dev.1": version "1.2.0-dev.1" @@ -709,7 +613,7 @@ dependencies: "@openzeppelin/contracts" "^2.4.0" -"@keep-network/sortition-pools@2.0.0", "@keep-network/sortition-pools@^2.0.0-pre.16": +"@keep-network/sortition-pools@^2.0.0-pre.16": version "2.0.0" resolved "https://registry.yarnpkg.com/@keep-network/sortition-pools/-/sortition-pools-2.0.0.tgz#04e29ec756d74e00d13505a3e2a7763b06d7a08d" integrity sha512-82pDOKcDBvHBFblCt0ALVr6qC6mxk339ZqnCfYx1zIPaPhzkw1RKOv28AqPoqzhzcdqLIoPh8g9RS/M2Lplh1A== @@ -717,77 +621,37 @@ "@openzeppelin/contracts" "^4.3.2" "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" -"@keep-network/sortition-pools@github:keep-network/sortition-pools#test-fork": - version "2.1.0-pre" - resolved "https://codeload.github.com/keep-network/sortition-pools/tar.gz/a41007f4c818864cdca0b6a6446424c071157ced" - dependencies: - "@openzeppelin/contracts" "^4.3.2" - "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - -"@keep-network/tbtc-v2-mainnet@npm:@keep-network/tbtc-v2@mainnet": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@keep-network/tbtc-v2/-/tbtc-v2-1.0.2.tgz#ae17196470517c9708e2c7bf3368e44be218cd21" - integrity sha512-Ly8msd4upIwjXcme4QsStRe0NqUZdSKZt4tANgdLY9YECHk0Uo2AfqLmknJQEictneuV/aId7JWvJph21WgjIA== - dependencies: - "@keep-network/bitcoin-spv-sol" "3.4.0-solc-0.8" - "@keep-network/ecdsa" "2.0.0" - "@keep-network/random-beacon" "2.0.0" - "@keep-network/tbtc" "1.1.0" - "@openzeppelin/contracts" "^4.6.0" - "@openzeppelin/contracts-upgradeable" "^4.6.0" - "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - -"@keep-network/tbtc-v2-testnet@npm:@keep-network/tbtc-v2@sepolia": - version "1.6.0-sepolia.0" - resolved "https://registry.yarnpkg.com/@keep-network/tbtc-v2/-/tbtc-v2-1.6.0-sepolia.0.tgz#2916677d9732d4ac7bd03d7e00a2d8c2fb71b0c7" - integrity sha512-cRupt7tEOqfSWQc2LUMtCZsuENe+VEjlo71MeFKaOQ7H1fe80A/VHHJUmoWw5XNDKyjJQb3oBmVhVDx2YfEL+w== +"@keep-network/tbtc-v2.ts@v2.5.0-dev.5": + version "2.5.0-dev.5" + resolved "https://registry.yarnpkg.com/@keep-network/tbtc-v2.ts/-/tbtc-v2.ts-2.5.0-dev.5.tgz#aee3d42b373c0c342a632a05b4cb6c23e8a5b11c" + integrity sha512-PSlDq9IbfiMoKKGRQIa/8aw0KlK4YuIoNKqLgYFggUmXNjULZxKoodfGKFB+WWX/Tl2wXH28mLAh0taiU/APFQ== dependencies: - "@keep-network/bitcoin-spv-sol" "3.4.0-solc-0.8" - "@keep-network/ecdsa" "2.1.0-sepolia.1" - "@keep-network/random-beacon" "2.1.0-sepolia.1" - "@keep-network/tbtc" "1.1.2-sepolia.0" - "@openzeppelin/contracts" "^4.8.1" - "@openzeppelin/contracts-upgradeable" "^4.8.1" - "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - -"@keep-network/tbtc-v2.ts@1.4.0-dev.1": - version "1.4.0-dev.1" - resolved "https://registry.yarnpkg.com/@keep-network/tbtc-v2.ts/-/tbtc-v2.ts-1.4.0-dev.1.tgz#a2f89db54aa0e8924f205f3bfbd411a2b79c9553" - integrity sha512-+20QZ4/FFGUdqVrY+N6+K+t2aQ8WcKlFjo0J/wiTMfb00A5KjJ8SDb3QI8+RHsvtbKnulnyH3VXEOAHBcI0IkQ== - dependencies: - "@keep-network/ecdsa" "2.1.0-dev.15" - "@keep-network/tbtc-v2" "1.6.0-dev.0" - bcoin "git+https://github.com/keep-network/bcoin.git#5accd32c63e6025a0d35d67739c4a6e84095a1f8" - bcrypto "git+https://github.com/bcoin-org/bcrypto.git#semver:~5.5.0" + "@bitcoinerlab/secp256k1" "^1.0.5" + "@keep-network/ecdsa" "2.1.0-dev.19" + "@keep-network/tbtc-v2" "1.7.0-dev.4" + bignumber.js "^9.1.2" + bitcoinjs-lib "^6.1.5" bufio "^1.0.6" + ecpair "^2.1.0" electrum-client-js "git+https://github.com/keep-network/electrum-client-js.git#v0.1.1" ethers "^5.5.2" p-timeout "^4.1.0" + url-parse "^1.5.10" wif "2.0.6" -"@keep-network/tbtc-v2@1.6.0-dev.0": - version "1.6.0-dev.0" - resolved "https://registry.yarnpkg.com/@keep-network/tbtc-v2/-/tbtc-v2-1.6.0-dev.0.tgz#ba95805cef3f04bde7379d3c3b14e882a9cfa080" - integrity sha512-5N2dMdFSdS+Ljvqnqoscft5xnbIK/U/z8Dc2hNXWULkPhIy0Mx/E7i7I4CpBTV4LazIo1Hq6W4EJtj+lmrekgg== +"@keep-network/tbtc-v2@1.7.0-dev.4": + version "1.7.0-dev.4" + resolved "https://registry.yarnpkg.com/@keep-network/tbtc-v2/-/tbtc-v2-1.7.0-dev.4.tgz#fafbd3c7ccc8c68dbdb3e9c684b7f106b42a5a78" + integrity sha512-+DxR5XebK0DB5WIrQyCQG2osixBYpJhOuwQtLu3EDMsi4tFAPEh5MFjWG5LYeuEtX65p19mSC4Vj69/Z3jMgrA== dependencies: "@keep-network/bitcoin-spv-sol" "3.4.0-solc-0.8" - "@keep-network/ecdsa" "2.1.0-dev.15" - "@keep-network/random-beacon" "2.1.0-dev.16" + "@keep-network/ecdsa" "2.1.0-dev.19" + "@keep-network/random-beacon" "2.1.0-dev.18" "@keep-network/tbtc" "1.1.2-dev.1" "@openzeppelin/contracts" "^4.8.1" "@openzeppelin/contracts-upgradeable" "^4.8.1" "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" -"@keep-network/tbtc@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@keep-network/tbtc/-/tbtc-1.1.0.tgz#9574ff355af04e77fb73a7bbe3e74cfd8764cf3c" - integrity sha512-V4sGR/t61PgkEF11GDZL5QNijVSdDhL7A7larcOSSCmKJOugxd5s+d+NdhYcHZhX9IS58ebtepvZan8TydHUHw== - dependencies: - "@keep-network/keep-ecdsa" "1.2.1" - "@summa-tx/bitcoin-spv-sol" "^3.1.0" - "@summa-tx/relay-sol" "^2.0.2" - openzeppelin-solidity "2.3.0" - "@keep-network/tbtc@1.1.2-dev.1": version "1.1.2-dev.1" resolved "https://registry.yarnpkg.com/@keep-network/tbtc/-/tbtc-1.1.2-dev.1.tgz#dd1e734c0fed50474c74d7170c8749127231d1f9" @@ -799,17 +663,6 @@ "@summa-tx/relay-sol" "^2.0.2" openzeppelin-solidity "2.3.0" -"@keep-network/tbtc@1.1.2-sepolia.0": - version "1.1.2-sepolia.0" - resolved "https://registry.yarnpkg.com/@keep-network/tbtc/-/tbtc-1.1.2-sepolia.0.tgz#6ef5f511a5ce80133f892f564c81b45afb9eaec9" - integrity sha512-p5H728tyG/Frli3N0//u4JiqFxiuW4uzMrMmnJFO7azBJPhdwEALhHRsIX6BNkVH2/NRnmu3MQYksqNnUYM6Bg== - dependencies: - "@celo/contractkit" "^1.0.2" - "@keep-network/keep-ecdsa" "1.9.0-sepolia.0" - "@summa-tx/bitcoin-spv-sol" "^3.1.0" - "@summa-tx/relay-sol" "^2.0.2" - openzeppelin-solidity "2.3.0" - "@ledgerhq/cryptoassets@^5.53.0": version "5.53.0" resolved "https://registry.yarnpkg.com/@ledgerhq/cryptoassets/-/cryptoassets-5.53.0.tgz#11dcc93211960c6fd6620392e4dd91896aaabe58" @@ -858,6 +711,16 @@ resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.50.0.tgz#29c6419e8379d496ab6d0426eadf3c4d100cd186" integrity sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA== +"@noble/hashes@^1.1.5", "@noble/hashes@^1.2.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" + integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== + +"@noble/secp256k1@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" + integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -879,11 +742,6 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@openzeppelin/contracts-ethereum-package@^2.4.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-ethereum-package/-/contracts-ethereum-package-2.5.0.tgz#cfb4b91f8132edde7e04bcd032575d4c6b544f4a" - integrity sha512-14CijdTyy4Y/3D3UUeFC2oW12nt1Yq1M8gFOtkuODEvSYPe3YSAKnKyhUeGf0UDNCZzwfGr15KdiFK6AoJjoSQ== - "@openzeppelin/contracts-upgradeable@^4.6.0", "@openzeppelin/contracts-upgradeable@^4.8.1": version "4.9.3" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.3.tgz#ff17a80fb945f5102571f8efecb5ce5915cc4811" @@ -1117,46 +975,26 @@ dependencies: "@openzeppelin/contracts" "^4.1.0" -"@threshold-network/solidity-contracts@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@threshold-network/solidity-contracts/-/solidity-contracts-1.2.1.tgz#8f9d8fe52f24b51acc52fdff765fdef3b8546587" - integrity sha512-v19gnQzdU52DLB6ZpkCW4YHTvApmwA1EG/YRxh+FRrzeDOC6rv+EqUhLgKpMtSpgBZT1ryqqLXm1QmjkW6CIGw== - dependencies: - "@keep-network/keep-core" "1.7.0" - "@openzeppelin/contracts" "~4.5.0" - "@openzeppelin/contracts-upgradeable" "~4.5.2" - "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - -"@threshold-network/solidity-contracts@1.3.0-dev.5": - version "1.3.0-dev.5" - resolved "https://registry.yarnpkg.com/@threshold-network/solidity-contracts/-/solidity-contracts-1.3.0-dev.5.tgz#f7a2727d627a10218f0667bc0d33e19ed8f87fdc" - integrity sha512-AInTKQkJ0PKa32q2m8GnZFPYEArsnvOwhIFdBFaHdq9r4EGyqHMf4YY1WjffkheBZ7AQ0DNA8Lst30kBoQd0SA== +"@threshold-network/solidity-contracts@1.3.0-dev.11": + version "1.3.0-dev.11" + resolved "https://registry.yarnpkg.com/@threshold-network/solidity-contracts/-/solidity-contracts-1.3.0-dev.11.tgz#849f20a5094c93359bbdea0c42780c318f985ee0" + integrity sha512-QQJB17BvuU/7UaitneoD7zFmIA3fZQ3FAvOAP2q+FkWEBZPYtAMf3+vB7y+Y+QlrcUl1kcA9wXD5auirsdxCBQ== dependencies: "@keep-network/keep-core" ">1.8.1-dev <1.8.1-goerli" "@openzeppelin/contracts" "~4.5.0" "@openzeppelin/contracts-upgradeable" "~4.5.2" "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" -"@threshold-network/solidity-contracts@1.3.0-dev.6": - version "1.3.0-dev.6" - resolved "https://registry.yarnpkg.com/@threshold-network/solidity-contracts/-/solidity-contracts-1.3.0-dev.6.tgz#41e34a84f409f63635e59f9a6ce170df1472b8a1" - integrity sha512-U7nMp+86M5qkjW7YUvT3qWgRiEEUIxqE96vkEiARTOkWX5JdLP2CXehkHCkEzjdgOCczmCp3fFtcgKFnQhhZ8A== +"@threshold-network/solidity-contracts@1.3.0-dev.12": + version "1.3.0-dev.12" + resolved "https://registry.yarnpkg.com/@threshold-network/solidity-contracts/-/solidity-contracts-1.3.0-dev.12.tgz#55e2d789ac6cd2180f8f55cd876a5bdd0a9b45e6" + integrity sha512-06EF583uEwko3ik7qjnMOg+sJ+Vb7YWkqag4a9xZq8Mmy8rifpmLjnfDKCVGeKbUis3uI++pTGC9U/EfvVOrlQ== dependencies: "@keep-network/keep-core" ">1.8.1-dev <1.8.1-goerli" "@openzeppelin/contracts" "~4.5.0" "@openzeppelin/contracts-upgradeable" "~4.5.2" "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" -"@threshold-network/solidity-contracts@1.3.0-sepolia.0": - version "1.3.0-sepolia.0" - resolved "https://registry.yarnpkg.com/@threshold-network/solidity-contracts/-/solidity-contracts-1.3.0-sepolia.0.tgz#9a2401094ca267844e08d1a5be1214d32bd99f93" - integrity sha512-FmRsi+WZAG805kpPYRWAeMbEDRDH44Af+q8UuyVKpjJh5ObcNz9MPGESeYflE1o8MsNpY1mfxZBY6olXPR/LCw== - dependencies: - "@keep-network/keep-core" "1.8.1-sepolia.0" - "@openzeppelin/contracts" "~4.5.0" - "@openzeppelin/contracts-upgradeable" "~4.5.2" - "@thesis/solidity-contracts" "github:thesis/solidity-contracts#4985bcf" - "@types/bignumber.js@^5.0.0": version "5.0.0" resolved "https://registry.yarnpkg.com/@types/bignumber.js/-/bignumber.js-5.0.0.tgz#d9f1a378509f3010a3255e9cc822ad0eeb4ab969" @@ -1165,9 +1003,9 @@ bignumber.js "*" "@types/bn.js@*": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" - integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== + version "5.1.5" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.5.tgz#2e0dacdcce2c0f16b905d20ff87aedbc6f7b4bf0" + integrity sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A== dependencies: "@types/node" "*" @@ -1208,9 +1046,9 @@ "@types/ms" "*" "@types/elliptic@^6.4.9": - version "6.4.14" - resolved "https://registry.yarnpkg.com/@types/elliptic/-/elliptic-6.4.14.tgz#7bbaad60567a588c1f08b10893453e6b9b4de48e" - integrity sha512-z4OBcDAU0GVwDTuwJzQCiL6188QvZMkvoERgcVjq0/mPM8jCfdwZ3x5zQEVoL9WCAru3aG5wl3Z5Ww5wBWn7ZQ== + version "6.4.18" + resolved "https://registry.yarnpkg.com/@types/elliptic/-/elliptic-6.4.18.tgz#bc96e26e1ccccbabe8b6f0e409c85898635482e1" + integrity sha512-UseG6H5vjRiNpQvrhy4VF/JXdA3V/Fp5amvveaL+fs28BZ6xIKJBPnUPRlEaZpysD9MbpfaLi8lbl7PGUAkpWw== dependencies: "@types/bn.js" "*" @@ -1223,14 +1061,14 @@ "@types/node" "*" "@types/google-libphonenumber@^7.4.17": - version "7.4.24" - resolved "https://registry.yarnpkg.com/@types/google-libphonenumber/-/google-libphonenumber-7.4.24.tgz#37ae6dbea69bea99dfe47559aede45ab1dd4de98" - integrity sha512-0gTFkoEd7j3KmxOMyEnubyvAeH2UJzu4ba2BIgY88OonZIyyS9u3NB0q8UW4A+OdIQp6OK8jwtpzy6I/IQw8Lg== + version "7.4.30" + resolved "https://registry.yarnpkg.com/@types/google-libphonenumber/-/google-libphonenumber-7.4.30.tgz#a47ed8f1f237bd43edbd1c8aff24400b0fd9b2fe" + integrity sha512-Td1X1ayRxePEm6/jPHUBs2tT6TzW1lrVB6ZX7ViPGellyzO/0xMNi+wx5nH6jEitjznq276VGIqjK5qAju0XVw== "@types/http-cache-semantics@*": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" - integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== + version "4.0.4" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4" + integrity sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA== "@types/json-schema@^7.0.9": version "7.0.11" @@ -1250,9 +1088,9 @@ "@types/node" "*" "@types/lodash@^4.14.170": - version "4.14.196" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.196.tgz#a7c3d6fc52d8d71328b764e28e080b4169ec7a95" - integrity sha512-22y3o88f4a94mKljsZcanlNWPzO0uBsBdzLAngf2tp533LzZcQzb6+eZPJ+vCTt+bqF2XnvT9gejTLsAcJAJyQ== + version "4.17.6" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.6.tgz#193ced6a40c8006cfc1ca3f4553444fb38f0e543" + integrity sha512-OpXEVoCKSS3lQqjx9GGGOapBeuW5eUboYHRlHP9urXPX25IKZ6AnP5ZRxtVf63iieUbsHxLn8NQ5Nlftc6yzAA== "@types/ms@*": version "0.7.31" @@ -1292,16 +1130,16 @@ "@types/node" "*" "@types/randombytes@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/randombytes/-/randombytes-2.0.0.tgz#0087ff5e60ae68023b9bc4398b406fea7ad18304" - integrity sha512-bz8PhAVlwN72vqefzxa14DKNT8jK/mV66CSjwdVQM/k3Th3EPKfUtdMniwZgMedQTFuywAsfjnZsg+pEnltaMA== + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/randombytes/-/randombytes-2.0.3.tgz#c83a107ef51ae7a8611a7b964f54b21cb782bbed" + integrity sha512-+NRgihTfuURllWCiIAhm1wsJqzsocnqXM77V/CalsdJIYSRGEHMnritxh+6EsBklshC+clo1KgnN14qgSGeQdw== dependencies: "@types/node" "*" "@types/responselike@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" - integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== + version "1.0.3" + resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.3.tgz#cc29706f0a397cfe6df89debfe4bf5cea159db50" + integrity sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw== dependencies: "@types/node" "*" @@ -1667,6 +1505,13 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +available-typed-arrays@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz#a5cc375d6a03c2efc87a553f3e0b1522def14846" + integrity sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ== + dependencies: + possible-typed-array-names "^1.0.0" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -1711,57 +1556,30 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base-x@^3.0.2, base-x@^3.0.8: +base-x@^3.0.2: version "3.0.9" resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== dependencies: safe-buffer "^5.0.1" +base-x@^3.0.8: + version "3.0.10" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.10.tgz#62de58653f8762b5d6f8d9fe30fa75f7b2585a75" + integrity sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ== + dependencies: + safe-buffer "^5.0.1" + +base-x@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-4.0.0.tgz#d0e3b7753450c73f8ad2389b5c018a4af7b2224a" + integrity sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw== + base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -"bcfg@git+https://github.com/bcoin-org/bcfg.git#semver:~0.1.7": - version "0.1.8" - resolved "git+https://github.com/bcoin-org/bcfg.git#90e1aff3b040160cd73956a500765ffcc823f0c2" - dependencies: - bsert "~0.0.10" - -"bcoin@git+https://github.com/keep-network/bcoin.git#5accd32c63e6025a0d35d67739c4a6e84095a1f8": - version "2.2.0" - resolved "git+https://github.com/keep-network/bcoin.git#5accd32c63e6025a0d35d67739c4a6e84095a1f8" - dependencies: - bcfg "git+https://github.com/bcoin-org/bcfg.git#semver:~0.1.7" - bcrypto "git+https://github.com/bcoin-org/bcrypto.git#semver:~5.5.0" - bcurl "git+https://github.com/bcoin-org/bcurl.git#semver:^0.1.6" - bdb "git+https://github.com/bcoin-org/bdb.git#semver:~1.2.1" - bdns "git+https://github.com/bcoin-org/bdns.git#semver:~0.1.5" - bevent "git+https://github.com/bcoin-org/bevent.git#semver:~0.1.5" - bfile "git+https://github.com/bcoin-org/bfile.git#semver:~0.2.1" - bfilter "git+https://github.com/bcoin-org/bfilter.git#semver:~2.3.0" - bheep "git+https://github.com/bcoin-org/bheep.git#semver:~0.1.5" - binet "git+https://github.com/bcoin-org/binet.git#semver:~0.3.5" - blgr "git+https://github.com/bcoin-org/blgr.git#semver:~0.2.0" - blru "git+https://github.com/bcoin-org/blru.git#semver:~0.1.6" - blst "git+https://github.com/bcoin-org/blst.git#semver:~0.1.5" - bmutex "git+https://github.com/bcoin-org/bmutex.git#semver:~0.1.6" - brq "git+https://github.com/bcoin-org/brq.git#semver:~0.1.7" - bs32 "git+https://github.com/bcoin-org/bs32.git#semver:=0.1.6" - bsert "git+https://github.com/chjj/bsert.git#semver:~0.0.10" - bsock "git+https://github.com/bcoin-org/bsock.git#semver:~0.1.9" - bsocks "git+https://github.com/bcoin-org/bsocks.git#semver:~0.2.6" - btcp "git+https://github.com/bcoin-org/btcp.git#semver:~0.1.5" - buffer-map "git+https://github.com/chjj/buffer-map.git#semver:~0.0.7" - bufio "git+https://github.com/bcoin-org/bufio.git#semver:~1.0.6" - bupnp "git+https://github.com/bcoin-org/bupnp.git#semver:~0.2.6" - bval "git+https://github.com/bcoin-org/bval.git#semver:~0.1.6" - bweb "git+https://github.com/bcoin-org/bweb.git#semver:=0.1.9" - loady "git+https://github.com/chjj/loady.git#semver:~0.0.1" - n64 "git+https://github.com/chjj/n64.git#semver:~0.2.10" - nan "git+https://github.com/braydonf/nan.git#semver:=2.14.0" - bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" @@ -1769,63 +1587,15 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -"bcrypto@git+https://github.com/bcoin-org/bcrypto.git#semver:~5.5.0": - version "5.5.1" - resolved "git+https://github.com/bcoin-org/bcrypto.git#42bcbd52831042f08cdf178d2cf30eacb62a4446" - dependencies: - bufio "~1.0.7" - loady "~0.0.5" - -"bcurl@git+https://github.com/bcoin-org/bcurl.git#semver:^0.1.6": - version "0.1.10" - resolved "git+https://github.com/bcoin-org/bcurl.git#d7e088fad4c284fb5d6fd7205c6b903bd3e6bf83" - dependencies: - brq "~0.1.8" - bsert "~0.0.10" - bsock "~0.1.9" - -"bdb@git+https://github.com/bcoin-org/bdb.git#semver:~1.2.1": - version "1.2.2" - resolved "git+https://github.com/bcoin-org/bdb.git#2c8d48c8adca4b11260263472766cd4b7ae74ef7" - dependencies: - bsert "~0.0.10" - loady "~0.0.1" - -"bdns@git+https://github.com/bcoin-org/bdns.git#semver:~0.1.5": - version "0.1.5" - resolved "git+https://github.com/bcoin-org/bdns.git#cb0b62a0075f7e1259fc50fa723ba644e9a07d14" - dependencies: - bsert "~0.0.10" - bech32@1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== -"bevent@git+https://github.com/bcoin-org/bevent.git#semver:~0.1.5": - version "0.1.5" - resolved "git+https://github.com/bcoin-org/bevent.git#60fb503de3ea1292d29ce438bfba80f0bc5ccb60" - dependencies: - bsert "~0.0.10" - -"bfile@git+https://github.com/bcoin-org/bfile.git#semver:~0.2.1": - version "0.2.3" - resolved "git+https://github.com/bcoin-org/bfile.git#c13235d04974f0fa5a487fdbaf74611523e2f4e6" - -"bfilter@git+https://github.com/bcoin-org/bfilter.git#semver:~2.3.0": - version "2.3.0" - resolved "git+https://github.com/bcoin-org/bfilter.git#70e42125f877191d340e8838a1a90fabb750e680" - dependencies: - bcrypto "git+https://github.com/bcoin-org/bcrypto.git#semver:~5.5.0" - bsert "git+https://github.com/chjj/bsert.git#semver:~0.0.10" - bufio "git+https://github.com/bcoin-org/bufio.git#semver:~1.0.6" - loady "git+https://github.com/chjj/loady.git#semver:~0.0.1" - -"bheep@git+https://github.com/bcoin-org/bheep.git#semver:~0.1.5": - version "0.1.5" - resolved "git+https://github.com/bcoin-org/bheep.git#e59329d0a776ae71b2fb7a2876ee5b9fd3030fa2" - dependencies: - bsert "~0.0.10" +bech32@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355" + integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg== big-integer@^1.6.44: version "1.6.51" @@ -1847,6 +1617,11 @@ bignumber.js@^7.2.0: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== +bignumber.js@^9.1.2: + version "9.1.2" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" + integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== + bindings@^1.3.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" @@ -1854,12 +1629,10 @@ bindings@^1.3.0: dependencies: file-uri-to-path "1.0.0" -"binet@git+https://github.com/bcoin-org/binet.git#semver:~0.3.5", binet@~0.3.5: - version "0.3.7" - resolved "git+https://github.com/bcoin-org/binet.git#138bbd45f343a35259333ac7cc995c3542b6d7dc" - dependencies: - bs32 "~0.1.5" - bsert "~0.0.10" +bip174@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/bip174/-/bip174-2.1.1.tgz#ef3e968cf76de234a546962bcf572cc150982f9f" + integrity sha512-mdFV5+/v0XyNYXjBS6CQPLo9ekCx4gtKZFnJm5PMto7Fs9hTTDpkkzOB7/FtluRI6JbUUAu+snTYfJRgHLZbZQ== bip32@2.0.5: version "2.0.5" @@ -1893,6 +1666,18 @@ bip39@3.0.2: pbkdf2 "^3.0.9" randombytes "^2.0.1" +bitcoinjs-lib@^6.1.5: + version "6.1.6" + resolved "https://registry.yarnpkg.com/bitcoinjs-lib/-/bitcoinjs-lib-6.1.6.tgz#f57c17c82511f860f11946d784c18da39f8618a8" + integrity sha512-Fk8+Vc+e2rMoDU5gXkW9tD+313rhkm5h6N9HfZxXvYU9LedttVvmXKTgd9k5rsQJjkSfsv6XRM8uhJv94SrvcA== + dependencies: + "@noble/hashes" "^1.2.0" + bech32 "^2.0.0" + bip174 "^2.1.1" + bs58check "^3.0.1" + typeforce "^1.11.3" + varuint-bitcoin "^1.1.2" + bl@^1.0.0: version "1.2.3" resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" @@ -1906,18 +1691,6 @@ blakejs@^1.1.0: resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== -"blgr@git+https://github.com/bcoin-org/blgr.git#semver:~0.2.0": - version "0.2.0" - resolved "git+https://github.com/bcoin-org/blgr.git#050cbb587a1654a078468dbb92606330fdc4d120" - dependencies: - bsert "~0.0.10" - -"blru@git+https://github.com/bcoin-org/blru.git#semver:~0.1.6": - version "0.1.6" - resolved "git+https://github.com/bcoin-org/blru.git#c2c093e9475439333dfb87bfb2fdc3be6c98b080" - dependencies: - bsert "~0.0.10" - "bls12377js@https://github.com/celo-org/bls12377js#400bcaeec9e7620b040bfad833268f5289699cac": version "0.1.0" resolved "https://github.com/celo-org/bls12377js#400bcaeec9e7620b040bfad833268f5289699cac" @@ -1942,23 +1715,11 @@ blakejs@^1.1.0: ts-node "^8.4.1" typescript "^3.6.4" -"blst@git+https://github.com/bcoin-org/blst.git#semver:~0.1.5": - version "0.1.5" - resolved "git+https://github.com/bcoin-org/blst.git#d588403edb18e628899e05aeba8c3a98a5cdedff" - dependencies: - bsert "~0.0.10" - bluebird@^3.5.0: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -"bmutex@git+https://github.com/bcoin-org/bmutex.git#semver:~0.1.6": - version "0.1.6" - resolved "git+https://github.com/bcoin-org/bmutex.git#e50782323932a4946ecc05a74c6d45861adc2c25" - dependencies: - bsert "~0.0.10" - bn.js@4.11.6: version "4.11.6" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" @@ -2094,18 +1855,6 @@ browserify-sign@^4.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" -"brq@git+https://github.com/bcoin-org/brq.git#semver:~0.1.7", brq@~0.1.7, brq@~0.1.8: - version "0.1.8" - resolved "git+https://github.com/bcoin-org/brq.git#534bb2c83fb366ba40ad80bc3de796a174503294" - dependencies: - bsert "~0.0.10" - -"bs32@git+https://github.com/bcoin-org/bs32.git#semver:=0.1.6", bs32@~0.1.5: - version "0.1.6" - resolved "git+https://github.com/bcoin-org/bs32.git#21cf9c724659dc15df722d2410548828c142f265" - dependencies: - bsert "~0.0.10" - bs58@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" @@ -2113,6 +1862,13 @@ bs58@^4.0.0: dependencies: base-x "^3.0.2" +bs58@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-5.0.0.tgz#865575b4d13c09ea2a84622df6c8cbeb54ffc279" + integrity sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ== + dependencies: + base-x "^4.0.0" + bs58check@<3.0.0, bs58check@^2.1.1, bs58check@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" @@ -2122,31 +1878,13 @@ bs58check@<3.0.0, bs58check@^2.1.1, bs58check@^2.1.2: create-hash "^1.1.0" safe-buffer "^5.1.2" -"bsert@git+https://github.com/chjj/bsert.git#semver:~0.0.10": - version "0.0.10" - resolved "git+https://github.com/chjj/bsert.git#bd09d49eab8644bca08ae8259a3d8756e7d453fc" - -bsert@~0.0.10: - version "0.0.12" - resolved "https://registry.yarnpkg.com/bsert/-/bsert-0.0.12.tgz#157c6a6beb1548af3b14d484fcd2a78eb440599d" - integrity sha512-lUB0EMu4KhIf+VQ6RZJ7J3dFdohYSeta+gNgDi00Hi/t3k/W6xZlwm9PSSG0q7hJ2zW9Rsn5yaMPymETxroTRw== - -"bsock@git+https://github.com/bcoin-org/bsock.git#semver:~0.1.9", bsock@~0.1.8, bsock@~0.1.9: - version "0.1.9" - resolved "git+https://github.com/bcoin-org/bsock.git#7cf76b3021ae7929c023d1170f789811e91ae528" - dependencies: - bsert "~0.0.10" - -"bsocks@git+https://github.com/bcoin-org/bsocks.git#semver:~0.2.6": - version "0.2.6" - resolved "git+https://github.com/bcoin-org/bsocks.git#6a8eb764dc4408e7f47da4f84e1afb1b393117e8" +bs58check@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-3.0.1.tgz#2094d13720a28593de1cba1d8c4e48602fdd841c" + integrity sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ== dependencies: - binet "~0.3.5" - bsert "~0.0.10" - -"btcp@git+https://github.com/bcoin-org/btcp.git#semver:~0.1.5": - version "0.1.5" - resolved "git+https://github.com/bcoin-org/btcp.git#4ea7e1ce5a43cd5348152c007aff76a419190a3a" + "@noble/hashes" "^1.2.0" + bs58 "^5.0.0" buffer-alloc-unsafe@^1.1.0: version "1.1.0" @@ -2176,10 +1914,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -"buffer-map@git+https://github.com/chjj/buffer-map.git#semver:~0.0.7": - version "0.0.7" - resolved "git+https://github.com/chjj/buffer-map.git#bad5863af9a520701937a17fc8fa2bd8ca8e73f3" - buffer-reverse@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-reverse/-/buffer-reverse-1.0.1.tgz#49283c8efa6f901bc01fa3304d06027971ae2f60" @@ -2223,31 +1957,6 @@ bufio@^1.0.6: resolved "https://registry.yarnpkg.com/bufio/-/bufio-1.2.0.tgz#b9ad1c06b0d9010363c387c39d2810a7086d143f" integrity sha512-UlFk8z/PwdhYQTXSQQagwGAdtRI83gib2n4uy4rQnenxUM2yQi8lBDzF230BNk+3wAoZDxYRoBwVVUPgHa9MCA== -"bufio@git+https://github.com/bcoin-org/bufio.git#semver:~1.0.6", bufio@~1.0.7: - version "1.0.7" - resolved "git+https://github.com/bcoin-org/bufio.git#91ae6c93899ff9fad7d7cee9afd2a1c4933ca984" - -"bupnp@git+https://github.com/bcoin-org/bupnp.git#semver:~0.2.6": - version "0.2.6" - resolved "git+https://github.com/bcoin-org/bupnp.git#c44fa7356aa297c9de96e8ad094a6816939cd688" - dependencies: - binet "~0.3.5" - brq "~0.1.7" - bsert "~0.0.10" - -"bval@git+https://github.com/bcoin-org/bval.git#semver:~0.1.6": - version "0.1.8" - resolved "git+https://github.com/bcoin-org/bval.git#f9c44d510bbc5bcc13cbd4b67e9704a24cc5ec0e" - dependencies: - bsert "~0.0.10" - -"bweb@git+https://github.com/bcoin-org/bweb.git#semver:=0.1.9": - version "0.1.9" - resolved "git+https://github.com/bcoin-org/bweb.git#31ae94ec9e97079610394e91928fe070d312c39d" - dependencies: - bsert "~0.0.10" - bsock "~0.1.8" - bytes@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" @@ -2292,6 +2001,17 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-bind@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" + integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + set-function-length "^1.2.1" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -2781,6 +2501,15 @@ defer-to-connect@^2.0.0: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== +define-data-property@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.4.tgz#894dc141bb7d3060ae4366f6a0107e68fbe48c5e" + integrity sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A== + dependencies: + es-define-property "^1.0.0" + es-errors "^1.3.0" + gopd "^1.0.1" + define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" @@ -2880,6 +2609,15 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +ecpair@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ecpair/-/ecpair-2.1.0.tgz#673f826b1d80d5eb091b8e2010c6b588e8d2cb45" + integrity sha512-cL/mh3MtJutFOvFc27GPZE2pWL3a3k4YvzUWEOvilnfZVlH3Jwgx/7d6tlD7/75tNk8TG2m+7Kgtz0SI1tWcqw== + dependencies: + randombytes "^2.1.0" + typeforce "^1.18.0" + wif "^2.0.6" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -2986,6 +2724,18 @@ es-array-method-boxes-properly@^1.0.0: resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== +es-define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" + integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== + dependencies: + get-intrinsic "^1.2.4" + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + es-get-iterator@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" @@ -3035,6 +2785,16 @@ es5-ext@^0.10.35, es5-ext@^0.10.50: es6-symbol "^3.1.3" next-tick "^1.1.0" +es5-ext@^0.10.62, es5-ext@^0.10.63, es5-ext@~0.10.14: + version "0.10.64" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714" + integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + esniff "^2.0.1" + next-tick "^1.1.0" + es6-iterator@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" @@ -3273,6 +3033,16 @@ eslint@8.22.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" +esniff@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308" + integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg== + dependencies: + d "^1.0.1" + es5-ext "^0.10.62" + event-emitter "^0.3.5" + type "^2.7.2" + espree@^9.3.3, espree@^9.4.0: version "9.4.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.4.1.tgz#51d6092615567a2c2cff7833445e37c28c0065bd" @@ -3509,6 +3279,14 @@ ethjs-util@0.1.6, ethjs-util@^0.1.3: is-hex-prefixed "1.0.0" strip-hex-prefix "1.0.0" +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== + dependencies: + d "1" + es5-ext "~0.10.14" + eventemitter3@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" @@ -3813,6 +3591,11 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + function.prototype.name@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" @@ -3858,6 +3641,17 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has-proto "^1.0.1" has-symbols "^1.0.3" +get-intrinsic@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" + integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-stream@^2.2.0: version "2.3.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" @@ -3972,7 +3766,12 @@ globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" -google-libphonenumber@^3.2.15, google-libphonenumber@^3.2.4: +google-libphonenumber@^3.2.15: + version "3.2.35" + resolved "https://registry.yarnpkg.com/google-libphonenumber/-/google-libphonenumber-3.2.35.tgz#887bbac68b0e13c6a3a52e3971129b320ceb1759" + integrity sha512-en9hgw54urlwBT0F+IULsJmdpeLpq5aQoTONIdp5jVIRviONPMfplUKdaCPBrHBlZNm49iVuZGR/V05IWqlvLQ== + +google-libphonenumber@^3.2.4: version "3.2.32" resolved "https://registry.yarnpkg.com/google-libphonenumber/-/google-libphonenumber-3.2.32.tgz#63c48a9c247b64a3bc2eec21bdf3fcfbf2e148c0" integrity sha512-mcNgakausov/B/eTgVeX8qc8IwWjRrupk9UzZZ/QDEvdh5fAjE7Aa211bkZpZj42zKkeS6MTT8avHUwjcLxuGQ== @@ -4088,6 +3887,13 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" +has-property-descriptors@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz#963ed7d071dc7bf5f084c5bfbe0d1b6222586854" + integrity sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg== + dependencies: + es-define-property "^1.0.0" + has-proto@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" @@ -4117,6 +3923,13 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -4149,6 +3962,13 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hasown@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + he@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" @@ -4461,13 +4281,20 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.10, is-typed-array@^1.1.3, is-typed-array@^1.1.9: +is-typed-array@^1.1.10, is-typed-array@^1.1.9: version "1.1.12" resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== dependencies: which-typed-array "^1.1.11" +is-typed-array@^1.1.3: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== + dependencies: + which-typed-array "^1.1.14" + is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -4651,9 +4478,9 @@ keyv@^3.0.0: json-buffer "3.0.0" keyv@^4.0.0: - version "4.5.3" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.3.tgz#00873d2b046df737963157bd04f294ca818c9c25" - integrity sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug== + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== dependencies: json-buffer "3.0.1" @@ -4677,10 +4504,6 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -"loady@git+https://github.com/chjj/loady.git#semver:~0.0.1", loady@~0.0.1, loady@~0.0.5: - version "0.0.5" - resolved "git+https://github.com/chjj/loady.git#b94958b7ee061518f4b85ea6da380e7ee93222d5" - locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -5022,19 +4845,11 @@ multihashes@^0.4.15, multihashes@~0.4.15: multibase "^0.7.0" varint "^5.0.0" -"n64@git+https://github.com/chjj/n64.git#semver:~0.2.10": - version "0.2.10" - resolved "git+https://github.com/chjj/n64.git#34f981f1441f569821d97a31f8cf21a3fc11b8f6" - nan@^2.13.2, nan@^2.14.0: version "2.17.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== -"nan@git+https://github.com/braydonf/nan.git#semver:=2.14.0": - version "2.14.0" - resolved "git+https://github.com/braydonf/nan.git#1dcc61bd06d84e389bfd5311b2b1492a14c74201" - nano-json-stream-parser@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" @@ -5079,9 +4894,9 @@ node-fetch@2.6.0: integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== node-fetch@^2.6.12: - version "2.6.12" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.12.tgz#02eb8e22074018e3d5a83016649d04df0e348fba" - integrity sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g== + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== dependencies: whatwg-url "^5.0.0" @@ -5476,6 +5291,11 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== +possible-typed-array-names@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" + integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -5591,6 +5411,11 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" @@ -5723,6 +5548,11 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + resolve-alpn@^1.0.0: version "1.2.1" resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" @@ -5965,6 +5795,18 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-length@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" + integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== + dependencies: + define-data-property "^1.1.4" + es-errors "^1.3.0" + function-bind "^1.1.2" + get-intrinsic "^1.2.4" + gopd "^1.0.1" + has-property-descriptors "^1.0.2" + setimmediate@1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" @@ -6504,7 +6346,7 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typeforce@^1.11.5: +typeforce@^1.11.3, typeforce@^1.11.5, typeforce@^1.18.0: version "1.18.0" resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.18.0.tgz#d7416a2c5845e085034d70fcc5b6cc4a90edbfdc" integrity sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g== @@ -6588,6 +6430,14 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" +url-parse@^1.5.10: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + url-set-query@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" @@ -6656,6 +6506,13 @@ varint@^5.0.0: resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== +varuint-bitcoin@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz#e76c138249d06138b480d4c5b40ef53693e24e92" + integrity sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw== + dependencies: + safe-buffer "^5.1.1" + vary@^1, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" @@ -7392,7 +7249,7 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -websocket@^1.0.29, websocket@^1.0.32: +websocket@^1.0.29: version "1.0.34" resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== @@ -7404,6 +7261,18 @@ websocket@^1.0.29, websocket@^1.0.32: utf-8-validate "^5.0.2" yaeti "^0.0.6" +websocket@^1.0.32: + version "1.0.35" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.35.tgz#374197207d7d4cc4c36cbf8a1bb886ee52a07885" + integrity sha512-/REy6amwPZl44DDzvRCkaI1q1bIiQB0mEFQLUrhz3z2EK91cp3n72rAjUlrTP0zV22HJIUOVHQGPxhFRjxjt+Q== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.63" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + "websocket@github:web3-js/WebSocket-Node#polyfill/globalThis": version "1.0.29" resolved "https://codeload.github.com/web3-js/WebSocket-Node/tar.gz/ef5ea2f41daf4a2113b80c9223df884b4d56c400" @@ -7453,7 +7322,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" integrity sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ== -which-typed-array@^1.1.10, which-typed-array@^1.1.11, which-typed-array@^1.1.2, which-typed-array@^1.1.9: +which-typed-array@^1.1.10, which-typed-array@^1.1.11, which-typed-array@^1.1.9: version "1.1.11" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== @@ -7464,6 +7333,17 @@ which-typed-array@^1.1.10, which-typed-array@^1.1.11, which-typed-array@^1.1.2, gopd "^1.0.1" has-tostringtag "^1.0.0" +which-typed-array@^1.1.14, which-typed-array@^1.1.2: + version "1.1.15" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" + integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== + dependencies: + available-typed-arrays "^1.0.7" + call-bind "^1.0.7" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.2" + which@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" diff --git a/typescript/api-reference/README.md b/typescript/api-reference/README.md index 15f8db8f4..fef7f0180 100644 --- a/typescript/api-reference/README.md +++ b/typescript/api-reference/README.md @@ -16,6 +16,8 @@ ### Classes +- [ArbitrumL2BitcoinDepositor](classes/ArbitrumL2BitcoinDepositor.md) +- [ArbitrumL2TBTCToken](classes/ArbitrumL2TBTCToken.md) - [BaseL2BitcoinDepositor](classes/BaseL2BitcoinDepositor.md) - [BaseL2TBTCToken](classes/BaseL2TBTCToken.md) - [BitcoinTxHash](classes/BitcoinTxHash.md) @@ -35,7 +37,6 @@ - [EthereumTBTCVault](classes/EthereumTBTCVault.md) - [EthereumWalletRegistry](classes/EthereumWalletRegistry.md) - [Hex](classes/Hex.md) -- [LedgerLiveEthereumSigner](classes/LedgerLiveEthereumSigner.md) - [MaintenanceService](classes/MaintenanceService.md) - [OptimisticMinting](classes/OptimisticMinting.md) - [RedemptionsService](classes/RedemptionsService.md) @@ -123,6 +124,7 @@ - [ethereumAddressFromSigner](README.md#ethereumaddressfromsigner) - [ethereumCrossChainContractsLoader](README.md#ethereumcrosschaincontractsloader) - [extractBitcoinRawTxVectors](README.md#extractbitcoinrawtxvectors) +- [loadArbitrumCrossChainContracts](README.md#loadarbitrumcrosschaincontracts) - [loadBaseCrossChainContracts](README.md#loadbasecrosschaincontracts) - [loadEthereumCoreContracts](README.md#loadethereumcorecontracts) - [packRevealDepositParameters](README.md#packrevealdepositparameters) @@ -143,7 +145,7 @@ Data about a Bitcoin transaction input. #### Defined in -[src/lib/bitcoin/tx.ts:63](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L63) +[lib/bitcoin/tx.ts:63](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L63) ___ @@ -155,7 +157,7 @@ Data about a Bitcoin unspent transaction output. #### Defined in -[src/lib/bitcoin/tx.ts:93](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L93) +[lib/bitcoin/tx.ts:93](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L93) ___ @@ -169,12 +171,13 @@ Type representing a mapping between specific L1 and L2 chains. | Name | Type | Description | | :------ | :------ | :------ | +| `arbitrum?` | [`Arbitrum`](enums/Chains.Arbitrum.md) | Identifier of the Arbitrum L2 chain. | | `base?` | [`Base`](enums/Chains.Base.md) | Identifier of the Base L2 chain. | | `ethereum?` | [`Ethereum`](enums/Chains.Ethereum.md) | Identifier of the Ethereum L1 chain. | #### Defined in -[src/lib/contracts/chain.ts:26](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain.ts#L26) +[lib/contracts/chain.ts:31](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain.ts#L31) ___ @@ -187,7 +190,7 @@ between TBTC L1 ledger chain and a specific supported L2/side-chain. #### Defined in -[src/lib/contracts/cross-chain.ts:12](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L12) +[lib/contracts/cross-chain.ts:12](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L12) ___ @@ -204,7 +207,7 @@ Mode of operation for the cross-chain depositor proxy: #### Defined in -[src/services/deposits/cross-chain.ts:19](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/cross-chain.ts#L19) +[services/deposits/cross-chain.ts:19](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/cross-chain.ts#L19) ___ @@ -216,7 +219,7 @@ Represents an event emitted on deposit reveal to the on-chain bridge. #### Defined in -[src/lib/contracts/bridge.ts:293](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L293) +[lib/contracts/bridge.ts:307](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L307) ___ @@ -229,7 +232,7 @@ wallet registry. #### Defined in -[src/lib/contracts/wallet-registry.ts:64](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L64) +[lib/contracts/wallet-registry.ts:64](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L64) ___ @@ -242,7 +245,7 @@ wallet registry. #### Defined in -[src/lib/contracts/wallet-registry.ts:79](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L79) +[lib/contracts/wallet-registry.ts:79](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L79) ___ @@ -255,7 +258,7 @@ wallet registry. #### Defined in -[src/lib/contracts/wallet-registry.ts:45](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L45) +[lib/contracts/wallet-registry.ts:45](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L45) ___ @@ -267,7 +270,7 @@ Additional options used by the Electrum server. #### Defined in -[src/lib/electrum/client.ts:49](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L49) +[lib/electrum/client.ts:49](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L49) ___ @@ -293,7 +296,7 @@ True if the error matches, false otherwise. #### Defined in -[src/lib/utils/backoff.ts:42](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/backoff.ts#L42) +[lib/utils/backoff.ts:42](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/backoff.ts#L42) ___ @@ -307,7 +310,7 @@ or a Provider that works only in the read-only mode. #### Defined in -[src/lib/ethereum/index.ts:34](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/index.ts#L34) +[lib/ethereum/index.ts:34](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/index.ts#L34) ___ @@ -333,7 +336,7 @@ A function that is called with execution status messages. #### Defined in -[src/lib/utils/backoff.ts:56](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/backoff.ts#L56) +[lib/utils/backoff.ts:56](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/backoff.ts#L56) ___ @@ -351,7 +354,7 @@ Aggregates L1-specific TBTC cross-chain contracts. #### Defined in -[src/lib/contracts/cross-chain.ts:25](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L25) +[lib/contracts/cross-chain.ts:25](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L25) ___ @@ -363,7 +366,7 @@ Layer 2 chains supported by tBTC v2 contracts. #### Defined in -[src/lib/contracts/chain.ts:21](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain.ts#L21) +[lib/contracts/chain.ts:26](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain.ts#L26) ___ @@ -382,7 +385,7 @@ Aggregates L2-specific TBTC cross-chain contracts. #### Defined in -[src/lib/contracts/cross-chain.ts:17](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L17) +[lib/contracts/cross-chain.ts:17](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L17) ___ @@ -394,7 +397,7 @@ Represents an event emitted when new wallet is registered on the on-chain bridge #### Defined in -[src/lib/contracts/bridge.ts:457](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L457) +[lib/contracts/bridge.ts:471](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L471) ___ @@ -407,7 +410,7 @@ is cancelled on chain. #### Defined in -[src/lib/contracts/tbtc-vault.ts:170](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L170) +[lib/contracts/tbtc-vault.ts:170](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L170) ___ @@ -420,7 +423,7 @@ is finalized on chain. #### Defined in -[src/lib/contracts/tbtc-vault.ts:186](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L186) +[lib/contracts/tbtc-vault.ts:186](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L186) ___ @@ -440,7 +443,7 @@ Bridge. #### Defined in -[src/lib/contracts/tbtc-vault.ts:120](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L120) +[lib/contracts/tbtc-vault.ts:120](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L120) ___ @@ -453,7 +456,7 @@ on chain. #### Defined in -[src/lib/contracts/tbtc-vault.ts:136](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L136) +[lib/contracts/tbtc-vault.ts:136](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L136) ___ @@ -465,7 +468,7 @@ Represents an event emitted on redemption request. #### Defined in -[src/lib/contracts/bridge.ts:344](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L344) +[lib/contracts/bridge.ts:358](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L358) ___ @@ -495,7 +498,7 @@ ___ #### Defined in -[src/lib/utils/backoff.ts:51](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/backoff.ts#L51) +[lib/utils/backoff.ts:51](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/backoff.ts#L51) ___ @@ -516,7 +519,7 @@ Convenience type aggregating all TBTC core contracts. #### Defined in -[src/lib/contracts/index.ts:19](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/index.ts#L19) +[lib/contracts/index.ts:19](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/index.ts#L19) ## Variables @@ -538,7 +541,7 @@ Utility functions allowing to perform Bitcoin address conversions. #### Defined in -[src/lib/bitcoin/address.ts:112](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/address.ts#L112) +[lib/bitcoin/address.ts:112](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/address.ts#L112) ___ @@ -556,7 +559,7 @@ Utility functions allowing to deal with Bitcoin compact size uints. #### Defined in -[src/lib/bitcoin/csuint.ts:50](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/csuint.ts#L50) +[lib/bitcoin/csuint.ts:50](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/csuint.ts#L50) ___ @@ -577,7 +580,7 @@ Utility functions allowing to deal with Bitcoin hashes. #### Defined in -[src/lib/bitcoin/hash.ts:52](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/hash.ts#L52) +[lib/bitcoin/hash.ts:52](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/hash.ts#L52) ___ @@ -597,7 +600,7 @@ Utility functions allowing to serialize and deserialize Bitcoin block headers. #### Defined in -[src/lib/bitcoin/header.ts:109](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/header.ts#L109) +[lib/bitcoin/header.ts:109](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/header.ts#L109) ___ @@ -616,7 +619,7 @@ Utility functions allowing to deal with Bitcoin locktime. #### Defined in -[src/lib/bitcoin/tx.ts:234](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L234) +[lib/bitcoin/tx.ts:234](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L234) ___ @@ -634,7 +637,7 @@ Utility functions allowing to perform operations on Bitcoin ECDSA private keys. #### Defined in -[src/lib/bitcoin/ecdsa-key.ts:77](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/ecdsa-key.ts#L77) +[lib/bitcoin/ecdsa-key.ts:77](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/ecdsa-key.ts#L77) ___ @@ -653,7 +656,7 @@ Utility functions allowing to perform operations on Bitcoin ECDSA public keys. #### Defined in -[src/lib/bitcoin/ecdsa-key.ts:51](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/ecdsa-key.ts#L51) +[lib/bitcoin/ecdsa-key.ts:51](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/ecdsa-key.ts#L51) ___ @@ -674,7 +677,7 @@ Utility functions allowing to deal with Bitcoin scripts. #### Defined in -[src/lib/bitcoin/script.ts:63](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/script.ts#L63) +[lib/bitcoin/script.ts:63](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/script.ts#L63) ___ @@ -693,7 +696,7 @@ Utility functions allowing to perform Bitcoin target conversions. #### Defined in -[src/lib/bitcoin/header.ts:268](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/header.ts#L268) +[lib/bitcoin/header.ts:268](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/header.ts#L268) ___ @@ -705,7 +708,7 @@ List of chain mappings supported by tBTC v2 contracts. #### Defined in -[src/lib/contracts/chain.ts:40](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain.ts#L40) +[lib/contracts/chain.ts:50](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain.ts#L50) ## Functions @@ -732,7 +735,7 @@ Bitcoin transaction along with the inclusion proof. #### Defined in -[src/lib/bitcoin/spv.ts:75](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/spv.ts#L75) +[lib/bitcoin/spv.ts:75](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/spv.ts#L75) ___ @@ -782,7 +785,7 @@ A function that can retry any function. #### Defined in -[src/lib/utils/backoff.ts:89](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/backoff.ts#L89) +[lib/utils/backoff.ts:89](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/backoff.ts#L89) ___ @@ -806,7 +809,7 @@ Chain ID as a string. #### Defined in -[src/lib/ethereum/index.ts:41](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/index.ts#L41) +[lib/ethereum/index.ts:41](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/index.ts#L41) ___ @@ -831,7 +834,7 @@ Electrum script hash as a hex string. #### Defined in -[src/lib/electrum/client.ts:668](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L668) +[lib/electrum/client.ts:668](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L668) ___ @@ -861,7 +864,7 @@ Throws an error if the address of the signer is not a proper #### Defined in -[src/lib/ethereum/index.ts:63](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/index.ts#L63) +[lib/ethereum/index.ts:63](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/index.ts#L63) ___ @@ -894,7 +897,7 @@ Throws an error if the signer's Ethereum chain ID is other than #### Defined in -[src/lib/ethereum/index.ts:118](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/index.ts#L118) +[lib/ethereum/index.ts:118](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/index.ts#L118) ___ @@ -919,7 +922,38 @@ Transaction data with fields represented as un-prefixed hex strings. #### Defined in -[src/lib/bitcoin/tx.ts:133](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L133) +[lib/bitcoin/tx.ts:133](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L133) + +___ + +### loadArbitrumCrossChainContracts + +▸ **loadArbitrumCrossChainContracts**(`signer`, `chainId`): `Promise`\<[`L2CrossChainContracts`](README.md#l2crosschaincontracts)\> + +Loads Arbitrum implementation of tBTC cross-chain contracts for the given Arbitrum +chain ID and attaches the given signer there. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `signer` | [`EthereumSigner`](README.md#ethereumsigner) | Signer that should be attached to the contracts. | +| `chainId` | [`Arbitrum`](enums/Chains.Arbitrum.md) | Arbitrum chain ID. | + +#### Returns + +`Promise`\<[`L2CrossChainContracts`](README.md#l2crosschaincontracts)\> + +Handle to the contracts. + +**`Throws`** + +Throws an error if the signer's Arbitrum chain ID is other than + the one used to load contracts. + +#### Defined in + +[lib/arbitrum/index.ts:22](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/arbitrum/index.ts#L22) ___ @@ -950,7 +984,7 @@ Throws an error if the signer's Base chain ID is other than #### Defined in -[src/lib/base/index.ts:22](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/index.ts#L22) +[lib/base/index.ts:22](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/base/index.ts#L22) ___ @@ -981,7 +1015,7 @@ Throws an error if the signer's Ethereum chain ID is other than #### Defined in -[src/lib/ethereum/index.ts:82](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/index.ts#L82) +[lib/ethereum/index.ts:82](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/index.ts#L82) ___ @@ -1025,7 +1059,7 @@ Packed parameters. #### Defined in -[src/lib/ethereum/bridge.ts:699](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L699) +[lib/ethereum/bridge.ts:714](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L714) ___ @@ -1050,7 +1084,7 @@ Always returns true. #### Defined in -[src/lib/utils/backoff.ts:9](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/backoff.ts#L9) +[lib/utils/backoff.ts:9](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/backoff.ts#L9) ___ @@ -1076,7 +1110,7 @@ Matcher function that returns false if error matches one of the patterns. #### Defined in -[src/lib/utils/backoff.ts:20](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/backoff.ts#L20) +[lib/utils/backoff.ts:20](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/backoff.ts#L20) ___ @@ -1105,7 +1139,7 @@ An error if the network is not supported by `bitcoinjs-lib`. #### Defined in -[src/lib/bitcoin/network.ts:55](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/network.ts#L55) +[lib/bitcoin/network.ts:55](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/network.ts#L55) ___ @@ -1146,7 +1180,7 @@ If any of the block headers are invalid, or if the block #### Defined in -[src/lib/bitcoin/header.ts:132](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/header.ts#L132) +[lib/bitcoin/header.ts:132](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/header.ts#L132) ___ @@ -1186,7 +1220,7 @@ The function should be used within a try-catch block. #### Defined in -[src/lib/bitcoin/spv.ts:180](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/spv.ts#L180) +[lib/bitcoin/spv.ts:180](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/spv.ts#L180) ___ @@ -1213,4 +1247,4 @@ This function does not validate the depositor's identifier as its #### Defined in -[src/lib/contracts/bridge.ts:233](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L233) +[lib/contracts/bridge.ts:247](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L247) diff --git a/typescript/api-reference/classes/ArbitrumL2BitcoinDepositor.md b/typescript/api-reference/classes/ArbitrumL2BitcoinDepositor.md new file mode 100644 index 000000000..003ec3484 --- /dev/null +++ b/typescript/api-reference/classes/ArbitrumL2BitcoinDepositor.md @@ -0,0 +1,307 @@ +# Class: ArbitrumL2BitcoinDepositor + +Implementation of the Arbitrum L2BitcoinDepositor handle. + +**`See`** + +for reference. + +## Hierarchy + +- `EthersContractHandle`\<`L2BitcoinDepositorTypechain`\> + + ↳ **`ArbitrumL2BitcoinDepositor`** + +## Implements + +- [`L2BitcoinDepositor`](../interfaces/L2BitcoinDepositor.md) + +## Table of contents + +### Constructors + +- [constructor](ArbitrumL2BitcoinDepositor.md#constructor) + +### Properties + +- [#depositOwner](ArbitrumL2BitcoinDepositor.md##depositowner) +- [#extraDataEncoder](ArbitrumL2BitcoinDepositor.md##extradataencoder) +- [\_deployedAtBlockNumber](ArbitrumL2BitcoinDepositor.md#_deployedatblocknumber) +- [\_instance](ArbitrumL2BitcoinDepositor.md#_instance) +- [\_totalRetryAttempts](ArbitrumL2BitcoinDepositor.md#_totalretryattempts) + +### Methods + +- [extraDataEncoder](ArbitrumL2BitcoinDepositor.md#extradataencoder) +- [getAddress](ArbitrumL2BitcoinDepositor.md#getaddress) +- [getChainIdentifier](ArbitrumL2BitcoinDepositor.md#getchainidentifier) +- [getDepositOwner](ArbitrumL2BitcoinDepositor.md#getdepositowner) +- [getEvents](ArbitrumL2BitcoinDepositor.md#getevents) +- [initializeDeposit](ArbitrumL2BitcoinDepositor.md#initializedeposit) +- [setDepositOwner](ArbitrumL2BitcoinDepositor.md#setdepositowner) + +## Constructors + +### constructor + +• **new ArbitrumL2BitcoinDepositor**(`config`, `chainId`): [`ArbitrumL2BitcoinDepositor`](ArbitrumL2BitcoinDepositor.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `config` | [`EthereumContractConfig`](../interfaces/EthereumContractConfig.md) | +| `chainId` | [`Arbitrum`](../enums/Chains.Arbitrum.md) | + +#### Returns + +[`ArbitrumL2BitcoinDepositor`](ArbitrumL2BitcoinDepositor.md) + +#### Overrides + +EthersContractHandle\<L2BitcoinDepositorTypechain\>.constructor + +#### Defined in + +[lib/arbitrum/l2-bitcoin-depositor.ts:37](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/arbitrum/l2-bitcoin-depositor.ts#L37) + +## Properties + +### #depositOwner + +• `Private` **#depositOwner**: `undefined` \| [`ChainIdentifier`](../interfaces/ChainIdentifier.md) + +#### Defined in + +[lib/arbitrum/l2-bitcoin-depositor.ts:35](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/arbitrum/l2-bitcoin-depositor.ts#L35) + +___ + +### #extraDataEncoder + +• `Private` `Readonly` **#extraDataEncoder**: [`CrossChainExtraDataEncoder`](../interfaces/CrossChainExtraDataEncoder.md) + +#### Defined in + +[lib/arbitrum/l2-bitcoin-depositor.ts:34](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/arbitrum/l2-bitcoin-depositor.ts#L34) + +___ + +### \_deployedAtBlockNumber + +• `Protected` `Readonly` **\_deployedAtBlockNumber**: `number` + +Number of a block within which the contract was deployed. Value is read from +the contract deployment artifact. It can be overwritten by setting a +[EthersContractConfig.deployedAtBlockNumber](../interfaces/EthereumContractConfig.md#deployedatblocknumber) property. + +#### Inherited from + +EthersContractHandle.\_deployedAtBlockNumber + +#### Defined in + +[lib/ethereum/adapter.ts:80](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) + +___ + +### \_instance + +• `Protected` `Readonly` **\_instance**: `L2BitcoinDepositor` + +Ethers instance of the deployed contract. + +#### Inherited from + +EthersContractHandle.\_instance + +#### Defined in + +[lib/ethereum/adapter.ts:74](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) + +___ + +### \_totalRetryAttempts + +• `Protected` `Readonly` **\_totalRetryAttempts**: `number` + +Number of retries for ethereum requests. + +#### Inherited from + +EthersContractHandle.\_totalRetryAttempts + +#### Defined in + +[lib/ethereum/adapter.ts:84](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) + +## Methods + +### extraDataEncoder + +▸ **extraDataEncoder**(): [`CrossChainExtraDataEncoder`](../interfaces/CrossChainExtraDataEncoder.md) + +#### Returns + +[`CrossChainExtraDataEncoder`](../interfaces/CrossChainExtraDataEncoder.md) + +**`See`** + +#### Implementation of + +[L2BitcoinDepositor](../interfaces/L2BitcoinDepositor.md).[extraDataEncoder](../interfaces/L2BitcoinDepositor.md#extradataencoder) + +#### Defined in + +[lib/arbitrum/l2-bitcoin-depositor.ts:85](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/arbitrum/l2-bitcoin-depositor.ts#L85) + +___ + +### getAddress + +▸ **getAddress**(): [`EthereumAddress`](EthereumAddress.md) + +Get address of the contract instance. + +#### Returns + +[`EthereumAddress`](EthereumAddress.md) + +Address of this contract instance. + +#### Inherited from + +EthersContractHandle.getAddress + +#### Defined in + +[lib/ethereum/adapter.ts:112](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) + +___ + +### getChainIdentifier + +▸ **getChainIdentifier**(): [`ChainIdentifier`](../interfaces/ChainIdentifier.md) + +#### Returns + +[`ChainIdentifier`](../interfaces/ChainIdentifier.md) + +**`See`** + +#### Implementation of + +[L2BitcoinDepositor](../interfaces/L2BitcoinDepositor.md).[getChainIdentifier](../interfaces/L2BitcoinDepositor.md#getchainidentifier) + +#### Defined in + +[lib/arbitrum/l2-bitcoin-depositor.ts:61](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/arbitrum/l2-bitcoin-depositor.ts#L61) + +___ + +### getDepositOwner + +▸ **getDepositOwner**(): `undefined` \| [`ChainIdentifier`](../interfaces/ChainIdentifier.md) + +#### Returns + +`undefined` \| [`ChainIdentifier`](../interfaces/ChainIdentifier.md) + +**`See`** + +#### Implementation of + +[L2BitcoinDepositor](../interfaces/L2BitcoinDepositor.md).[getDepositOwner](../interfaces/L2BitcoinDepositor.md#getdepositowner) + +#### Defined in + +[lib/arbitrum/l2-bitcoin-depositor.ts:69](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/arbitrum/l2-bitcoin-depositor.ts#L69) + +___ + +### getEvents + +▸ **getEvents**(`eventName`, `options?`, `...filterArgs`): `Promise`\<`Event`[]\> + +Get events emitted by the Ethereum contract. +It starts searching from provided block number. If the GetEvents.Options#fromBlock +option is missing it looks for a contract's defined property +[_deployedAtBlockNumber](BaseL2BitcoinDepositor.md#_deployedatblocknumber). If the property is missing starts searching +from block `0`. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `eventName` | `string` | Name of the event. | +| `options?` | [`Options`](../interfaces/GetChainEvents.Options.md) | Options for events fetching. | +| `...filterArgs` | `unknown`[] | Arguments for events filtering. | + +#### Returns + +`Promise`\<`Event`[]\> + +Array of found events. + +#### Inherited from + +EthersContractHandle.getEvents + +#### Defined in + +[lib/ethereum/adapter.ts:127](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) + +___ + +### initializeDeposit + +▸ **initializeDeposit**(`depositTx`, `depositOutputIndex`, `deposit`, `vault?`): `Promise`\<[`Hex`](Hex.md)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `depositTx` | [`BitcoinRawTxVectors`](../interfaces/BitcoinRawTxVectors.md) | +| `depositOutputIndex` | `number` | +| `deposit` | [`DepositReceipt`](../interfaces/DepositReceipt.md) | +| `vault?` | [`ChainIdentifier`](../interfaces/ChainIdentifier.md) | + +#### Returns + +`Promise`\<[`Hex`](Hex.md)\> + +**`See`** + +#### Implementation of + +[L2BitcoinDepositor](../interfaces/L2BitcoinDepositor.md).[initializeDeposit](../interfaces/L2BitcoinDepositor.md#initializedeposit) + +#### Defined in + +[lib/arbitrum/l2-bitcoin-depositor.ts:93](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/arbitrum/l2-bitcoin-depositor.ts#L93) + +___ + +### setDepositOwner + +▸ **setDepositOwner**(`depositOwner`): `void` + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `depositOwner` | `undefined` \| [`ChainIdentifier`](../interfaces/ChainIdentifier.md) | + +#### Returns + +`void` + +**`See`** + +#### Implementation of + +[L2BitcoinDepositor](../interfaces/L2BitcoinDepositor.md).[setDepositOwner](../interfaces/L2BitcoinDepositor.md#setdepositowner) + +#### Defined in + +[lib/arbitrum/l2-bitcoin-depositor.ts:77](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/arbitrum/l2-bitcoin-depositor.ts#L77) diff --git a/typescript/api-reference/classes/ArbitrumL2TBTCToken.md b/typescript/api-reference/classes/ArbitrumL2TBTCToken.md new file mode 100644 index 000000000..f22b91438 --- /dev/null +++ b/typescript/api-reference/classes/ArbitrumL2TBTCToken.md @@ -0,0 +1,213 @@ +# Class: ArbitrumL2TBTCToken + +Implementation of the Arbitrum L2TBTCToken handle. + +**`See`** + +for reference. + +## Hierarchy + +- `EthersContractHandle`\<`L2TBTCTypechain`\> + + ↳ **`ArbitrumL2TBTCToken`** + +## Implements + +- [`L2TBTCToken`](../interfaces/L2TBTCToken.md) + +## Table of contents + +### Constructors + +- [constructor](ArbitrumL2TBTCToken.md#constructor) + +### Properties + +- [\_deployedAtBlockNumber](ArbitrumL2TBTCToken.md#_deployedatblocknumber) +- [\_instance](ArbitrumL2TBTCToken.md#_instance) +- [\_totalRetryAttempts](ArbitrumL2TBTCToken.md#_totalretryattempts) + +### Methods + +- [balanceOf](ArbitrumL2TBTCToken.md#balanceof) +- [getAddress](ArbitrumL2TBTCToken.md#getaddress) +- [getChainIdentifier](ArbitrumL2TBTCToken.md#getchainidentifier) +- [getEvents](ArbitrumL2TBTCToken.md#getevents) + +## Constructors + +### constructor + +• **new ArbitrumL2TBTCToken**(`config`, `chainId`): [`ArbitrumL2TBTCToken`](ArbitrumL2TBTCToken.md) + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `config` | [`EthereumContractConfig`](../interfaces/EthereumContractConfig.md) | +| `chainId` | [`Arbitrum`](../enums/Chains.Arbitrum.md) | + +#### Returns + +[`ArbitrumL2TBTCToken`](ArbitrumL2TBTCToken.md) + +#### Overrides + +EthersContractHandle\<L2TBTCTypechain\>.constructor + +#### Defined in + +[lib/arbitrum/l2-tbtc-token.ts:23](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/arbitrum/l2-tbtc-token.ts#L23) + +## Properties + +### \_deployedAtBlockNumber + +• `Protected` `Readonly` **\_deployedAtBlockNumber**: `number` + +Number of a block within which the contract was deployed. Value is read from +the contract deployment artifact. It can be overwritten by setting a +[EthersContractConfig.deployedAtBlockNumber](../interfaces/EthereumContractConfig.md#deployedatblocknumber) property. + +#### Inherited from + +EthersContractHandle.\_deployedAtBlockNumber + +#### Defined in + +[lib/ethereum/adapter.ts:80](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) + +___ + +### \_instance + +• `Protected` `Readonly` **\_instance**: `L2TBTC` + +Ethers instance of the deployed contract. + +#### Inherited from + +EthersContractHandle.\_instance + +#### Defined in + +[lib/ethereum/adapter.ts:74](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) + +___ + +### \_totalRetryAttempts + +• `Protected` `Readonly` **\_totalRetryAttempts**: `number` + +Number of retries for ethereum requests. + +#### Inherited from + +EthersContractHandle.\_totalRetryAttempts + +#### Defined in + +[lib/ethereum/adapter.ts:84](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) + +## Methods + +### balanceOf + +▸ **balanceOf**(`identifier`): `Promise`\<`BigNumber`\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `identifier` | [`ChainIdentifier`](../interfaces/ChainIdentifier.md) | + +#### Returns + +`Promise`\<`BigNumber`\> + +**`See`** + +#### Implementation of + +[L2TBTCToken](../interfaces/L2TBTCToken.md).[balanceOf](../interfaces/L2TBTCToken.md#balanceof) + +#### Defined in + +[lib/arbitrum/l2-tbtc-token.ts:53](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/arbitrum/l2-tbtc-token.ts#L53) + +___ + +### getAddress + +▸ **getAddress**(): [`EthereumAddress`](EthereumAddress.md) + +Get address of the contract instance. + +#### Returns + +[`EthereumAddress`](EthereumAddress.md) + +Address of this contract instance. + +#### Inherited from + +EthersContractHandle.getAddress + +#### Defined in + +[lib/ethereum/adapter.ts:112](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) + +___ + +### getChainIdentifier + +▸ **getChainIdentifier**(): [`ChainIdentifier`](../interfaces/ChainIdentifier.md) + +#### Returns + +[`ChainIdentifier`](../interfaces/ChainIdentifier.md) + +**`See`** + +#### Implementation of + +[L2TBTCToken](../interfaces/L2TBTCToken.md).[getChainIdentifier](../interfaces/L2TBTCToken.md#getchainidentifier) + +#### Defined in + +[lib/arbitrum/l2-tbtc-token.ts:45](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/arbitrum/l2-tbtc-token.ts#L45) + +___ + +### getEvents + +▸ **getEvents**(`eventName`, `options?`, `...filterArgs`): `Promise`\<`Event`[]\> + +Get events emitted by the Ethereum contract. +It starts searching from provided block number. If the GetEvents.Options#fromBlock +option is missing it looks for a contract's defined property +[_deployedAtBlockNumber](BaseL2BitcoinDepositor.md#_deployedatblocknumber). If the property is missing starts searching +from block `0`. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `eventName` | `string` | Name of the event. | +| `options?` | [`Options`](../interfaces/GetChainEvents.Options.md) | Options for events fetching. | +| `...filterArgs` | `unknown`[] | Arguments for events filtering. | + +#### Returns + +`Promise`\<`Event`[]\> + +Array of found events. + +#### Inherited from + +EthersContractHandle.getEvents + +#### Defined in + +[lib/ethereum/adapter.ts:127](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) diff --git a/typescript/api-reference/classes/BaseL2BitcoinDepositor.md b/typescript/api-reference/classes/BaseL2BitcoinDepositor.md index b02ea4910..e65931ace 100644 --- a/typescript/api-reference/classes/BaseL2BitcoinDepositor.md +++ b/typescript/api-reference/classes/BaseL2BitcoinDepositor.md @@ -63,7 +63,7 @@ EthersContractHandle\<L2BitcoinDepositorTypechain\>.constructor #### Defined in -[src/lib/base/l2-bitcoin-depositor.ts:37](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L37) +[lib/base/l2-bitcoin-depositor.ts:37](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L37) ## Properties @@ -73,7 +73,7 @@ EthersContractHandle\<L2BitcoinDepositorTypechain\>.constructor #### Defined in -[src/lib/base/l2-bitcoin-depositor.ts:35](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L35) +[lib/base/l2-bitcoin-depositor.ts:35](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L35) ___ @@ -83,7 +83,7 @@ ___ #### Defined in -[src/lib/base/l2-bitcoin-depositor.ts:34](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L34) +[lib/base/l2-bitcoin-depositor.ts:34](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L34) ___ @@ -101,7 +101,7 @@ EthersContractHandle.\_deployedAtBlockNumber #### Defined in -[src/lib/ethereum/adapter.ts:80](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) +[lib/ethereum/adapter.ts:80](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) ___ @@ -117,7 +117,7 @@ EthersContractHandle.\_instance #### Defined in -[src/lib/ethereum/adapter.ts:74](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) +[lib/ethereum/adapter.ts:74](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) ___ @@ -133,7 +133,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[src/lib/ethereum/adapter.ts:84](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) +[lib/ethereum/adapter.ts:84](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) ## Methods @@ -153,7 +153,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[src/lib/base/l2-bitcoin-depositor.ts:85](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L85) +[lib/base/l2-bitcoin-depositor.ts:85](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L85) ___ @@ -175,7 +175,7 @@ EthersContractHandle.getAddress #### Defined in -[src/lib/ethereum/adapter.ts:112](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) +[lib/ethereum/adapter.ts:112](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) ___ @@ -195,7 +195,7 @@ ___ #### Defined in -[src/lib/base/l2-bitcoin-depositor.ts:61](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L61) +[lib/base/l2-bitcoin-depositor.ts:61](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L61) ___ @@ -215,7 +215,7 @@ ___ #### Defined in -[src/lib/base/l2-bitcoin-depositor.ts:69](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L69) +[lib/base/l2-bitcoin-depositor.ts:69](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L69) ___ @@ -249,7 +249,7 @@ EthersContractHandle.getEvents #### Defined in -[src/lib/ethereum/adapter.ts:127](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) +[lib/ethereum/adapter.ts:127](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) ___ @@ -278,7 +278,7 @@ ___ #### Defined in -[src/lib/base/l2-bitcoin-depositor.ts:93](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L93) +[lib/base/l2-bitcoin-depositor.ts:93](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L93) ___ @@ -304,4 +304,4 @@ ___ #### Defined in -[src/lib/base/l2-bitcoin-depositor.ts:77](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L77) +[lib/base/l2-bitcoin-depositor.ts:77](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/base/l2-bitcoin-depositor.ts#L77) diff --git a/typescript/api-reference/classes/BaseL2TBTCToken.md b/typescript/api-reference/classes/BaseL2TBTCToken.md index 14a748b55..759e0e496 100644 --- a/typescript/api-reference/classes/BaseL2TBTCToken.md +++ b/typescript/api-reference/classes/BaseL2TBTCToken.md @@ -58,7 +58,7 @@ EthersContractHandle\<L2TBTCTypechain\>.constructor #### Defined in -[src/lib/base/l2-tbtc-token.ts:23](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-tbtc-token.ts#L23) +[lib/base/l2-tbtc-token.ts:23](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/base/l2-tbtc-token.ts#L23) ## Properties @@ -76,7 +76,7 @@ EthersContractHandle.\_deployedAtBlockNumber #### Defined in -[src/lib/ethereum/adapter.ts:80](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) +[lib/ethereum/adapter.ts:80](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) ___ @@ -92,7 +92,7 @@ EthersContractHandle.\_instance #### Defined in -[src/lib/ethereum/adapter.ts:74](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) +[lib/ethereum/adapter.ts:74](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) ___ @@ -108,7 +108,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[src/lib/ethereum/adapter.ts:84](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) +[lib/ethereum/adapter.ts:84](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) ## Methods @@ -134,7 +134,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[src/lib/base/l2-tbtc-token.ts:53](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-tbtc-token.ts#L53) +[lib/base/l2-tbtc-token.ts:53](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/base/l2-tbtc-token.ts#L53) ___ @@ -156,7 +156,7 @@ EthersContractHandle.getAddress #### Defined in -[src/lib/ethereum/adapter.ts:112](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) +[lib/ethereum/adapter.ts:112](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) ___ @@ -176,7 +176,7 @@ ___ #### Defined in -[src/lib/base/l2-tbtc-token.ts:45](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/base/l2-tbtc-token.ts#L45) +[lib/base/l2-tbtc-token.ts:45](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/base/l2-tbtc-token.ts#L45) ___ @@ -210,4 +210,4 @@ EthersContractHandle.getEvents #### Defined in -[src/lib/ethereum/adapter.ts:127](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) +[lib/ethereum/adapter.ts:127](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) diff --git a/typescript/api-reference/classes/BitcoinTxHash.md b/typescript/api-reference/classes/BitcoinTxHash.md index 04b246409..86d8b8a3d 100644 --- a/typescript/api-reference/classes/BitcoinTxHash.md +++ b/typescript/api-reference/classes/BitcoinTxHash.md @@ -53,7 +53,7 @@ the use cases that expect the Bitcoin internal byte order. #### Defined in -[src/lib/utils/hex.ts:7](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L7) +[lib/utils/hex.ts:7](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L7) ## Properties @@ -67,7 +67,7 @@ the use cases that expect the Bitcoin internal byte order. #### Defined in -[src/lib/utils/hex.ts:5](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L5) +[lib/utils/hex.ts:5](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L5) ## Methods @@ -95,7 +95,7 @@ True if both values are equal, false otherwise. #### Defined in -[src/lib/utils/hex.ts:57](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L57) +[lib/utils/hex.ts:57](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L57) ___ @@ -115,7 +115,7 @@ Reversed hexadecimal value. #### Defined in -[src/lib/utils/hex.ts:64](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L64) +[lib/utils/hex.ts:64](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L64) ___ @@ -135,7 +135,7 @@ Hexadecimal value as a Buffer. #### Defined in -[src/lib/utils/hex.ts:32](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L32) +[lib/utils/hex.ts:32](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L32) ___ @@ -155,7 +155,7 @@ Hexadecimal string prefixed with '0x'. #### Defined in -[src/lib/utils/hex.ts:46](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L46) +[lib/utils/hex.ts:46](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L46) ___ @@ -175,7 +175,7 @@ Unprefixed hexadecimal string. #### Defined in -[src/lib/utils/hex.ts:39](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L39) +[lib/utils/hex.ts:39](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L39) ___ @@ -199,4 +199,4 @@ ___ #### Defined in -[src/lib/utils/hex.ts:25](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L25) +[lib/utils/hex.ts:25](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L25) diff --git a/typescript/api-reference/classes/CrossChainDepositor.md b/typescript/api-reference/classes/CrossChainDepositor.md index ddc99c141..e2bc223ac 100644 --- a/typescript/api-reference/classes/CrossChainDepositor.md +++ b/typescript/api-reference/classes/CrossChainDepositor.md @@ -49,7 +49,7 @@ for reference. #### Defined in -[src/services/deposits/cross-chain.ts:31](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/cross-chain.ts#L31) +[services/deposits/cross-chain.ts:31](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/cross-chain.ts#L31) ## Properties @@ -59,7 +59,7 @@ for reference. #### Defined in -[src/services/deposits/cross-chain.ts:28](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/cross-chain.ts#L28) +[services/deposits/cross-chain.ts:28](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/cross-chain.ts#L28) ___ @@ -69,7 +69,7 @@ ___ #### Defined in -[src/services/deposits/cross-chain.ts:29](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/cross-chain.ts#L29) +[services/deposits/cross-chain.ts:29](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/cross-chain.ts#L29) ## Methods @@ -83,7 +83,7 @@ ___ #### Defined in -[src/services/deposits/cross-chain.ts:72](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/cross-chain.ts#L72) +[services/deposits/cross-chain.ts:72](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/cross-chain.ts#L72) ___ @@ -107,7 +107,7 @@ Throws if the L2 deposit owner cannot be resolved. This #### Defined in -[src/services/deposits/cross-chain.ts:61](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/cross-chain.ts#L61) +[services/deposits/cross-chain.ts:61](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/cross-chain.ts#L61) ___ @@ -135,7 +135,7 @@ The chain-specific identifier of the contract that will be #### Defined in -[src/services/deposits/cross-chain.ts:49](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/cross-chain.ts#L49) +[services/deposits/cross-chain.ts:49](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/cross-chain.ts#L49) ___ @@ -169,4 +169,4 @@ Reveals the given deposit depending on the reveal mode. #### Defined in -[src/services/deposits/cross-chain.ts:87](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/cross-chain.ts#L87) +[services/deposits/cross-chain.ts:87](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/cross-chain.ts#L87) diff --git a/typescript/api-reference/classes/Deposit.md b/typescript/api-reference/classes/Deposit.md index 3dc82c46f..8386d6b2e 100644 --- a/typescript/api-reference/classes/Deposit.md +++ b/typescript/api-reference/classes/Deposit.md @@ -48,7 +48,7 @@ This component tries to abstract away that complexity. #### Defined in -[src/services/deposits/deposit.ts:47](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L47) +[services/deposits/deposit.ts:47](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L47) ## Properties @@ -60,7 +60,7 @@ Bitcoin client handle. #### Defined in -[src/services/deposits/deposit.ts:36](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L36) +[services/deposits/deposit.ts:36](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L36) ___ @@ -73,7 +73,7 @@ generated deposit address. #### Defined in -[src/services/deposits/deposit.ts:45](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L45) +[services/deposits/deposit.ts:45](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L45) ___ @@ -85,7 +85,7 @@ Optional depositor proxy used to initiate minting. #### Defined in -[src/services/deposits/deposit.ts:40](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L40) +[services/deposits/deposit.ts:40](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L40) ___ @@ -97,7 +97,7 @@ Bitcoin script corresponding to this deposit. #### Defined in -[src/services/deposits/deposit.ts:28](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L28) +[services/deposits/deposit.ts:28](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L28) ___ @@ -109,7 +109,7 @@ Handle to tBTC contracts. #### Defined in -[src/services/deposits/deposit.ts:32](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L32) +[services/deposits/deposit.ts:32](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L32) ## Methods @@ -130,7 +130,7 @@ Specific UTXOs targeting this deposit. Empty array in case #### Defined in -[src/services/deposits/deposit.ts:99](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L99) +[services/deposits/deposit.ts:99](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L99) ___ @@ -146,7 +146,7 @@ Bitcoin address corresponding to this deposit. #### Defined in -[src/services/deposits/deposit.ts:88](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L88) +[services/deposits/deposit.ts:88](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L88) ___ @@ -162,7 +162,7 @@ Receipt corresponding to this deposit. #### Defined in -[src/services/deposits/deposit.ts:81](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L81) +[services/deposits/deposit.ts:81](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L81) ___ @@ -206,7 +206,7 @@ Throws an error if the funding outpoint was already used to #### Defined in -[src/services/deposits/deposit.ts:128](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L128) +[services/deposits/deposit.ts:128](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L128) ___ @@ -229,4 +229,4 @@ ___ #### Defined in -[src/services/deposits/deposit.ts:61](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L61) +[services/deposits/deposit.ts:61](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L61) diff --git a/typescript/api-reference/classes/DepositFunding.md b/typescript/api-reference/classes/DepositFunding.md index 5fef70a82..2bc2b292c 100644 --- a/typescript/api-reference/classes/DepositFunding.md +++ b/typescript/api-reference/classes/DepositFunding.md @@ -41,7 +41,7 @@ the given tBTC v2 deposit script. #### Defined in -[src/services/deposits/funding.ts:30](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/funding.ts#L30) +[services/deposits/funding.ts:30](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/funding.ts#L30) ## Properties @@ -51,7 +51,7 @@ the given tBTC v2 deposit script. #### Defined in -[src/services/deposits/funding.ts:28](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/funding.ts#L28) +[services/deposits/funding.ts:28](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/funding.ts#L28) ## Methods @@ -101,7 +101,7 @@ When the sum of the selected UTXOs is insufficient to cover #### Defined in -[src/services/deposits/funding.ts:62](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/funding.ts#L62) +[services/deposits/funding.ts:62](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/funding.ts#L62) ___ @@ -151,7 +151,7 @@ When the sum of the selected UTXOs is insufficient to cover #### Defined in -[src/services/deposits/funding.ts:181](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/funding.ts#L181) +[services/deposits/funding.ts:181](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/funding.ts#L181) ___ @@ -171,4 +171,4 @@ ___ #### Defined in -[src/services/deposits/funding.ts:34](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/funding.ts#L34) +[services/deposits/funding.ts:34](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/funding.ts#L34) diff --git a/typescript/api-reference/classes/DepositRefund.md b/typescript/api-reference/classes/DepositRefund.md index 0cce0d135..98598be94 100644 --- a/typescript/api-reference/classes/DepositRefund.md +++ b/typescript/api-reference/classes/DepositRefund.md @@ -44,7 +44,7 @@ the given tBTC v2 deposit script. #### Defined in -[src/services/deposits/refund.ts:37](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/refund.ts#L37) +[services/deposits/refund.ts:37](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/refund.ts#L37) ## Properties @@ -54,7 +54,7 @@ the given tBTC v2 deposit script. #### Defined in -[src/services/deposits/refund.ts:35](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/refund.ts#L35) +[services/deposits/refund.ts:35](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/refund.ts#L35) ## Methods @@ -84,7 +84,7 @@ The outcome consisting of: #### Defined in -[src/services/deposits/refund.ts:111](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/refund.ts#L111) +[services/deposits/refund.ts:111](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/refund.ts#L111) ___ @@ -113,7 +113,7 @@ Error if there are discrepancies in values or key formats. #### Defined in -[src/services/deposits/refund.ts:191](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/refund.ts#L191) +[services/deposits/refund.ts:191](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/refund.ts#L191) ___ @@ -139,7 +139,7 @@ An empty promise upon successful signing. #### Defined in -[src/services/deposits/refund.ts:219](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/refund.ts#L219) +[services/deposits/refund.ts:219](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/refund.ts#L219) ___ @@ -166,7 +166,7 @@ An empty promise upon successful signing. #### Defined in -[src/services/deposits/refund.ts:256](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/refund.ts#L256) +[services/deposits/refund.ts:256](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/refund.ts#L256) ___ @@ -203,7 +203,7 @@ This function should be called by the refunder after `refundLocktime` #### Defined in -[src/services/deposits/refund.ts:63](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/refund.ts#L63) +[services/deposits/refund.ts:63](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/refund.ts#L63) ___ @@ -223,4 +223,4 @@ ___ #### Defined in -[src/services/deposits/refund.ts:41](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/refund.ts#L41) +[services/deposits/refund.ts:41](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/refund.ts#L41) diff --git a/typescript/api-reference/classes/DepositScript.md b/typescript/api-reference/classes/DepositScript.md index fd192a72e..cbd704679 100644 --- a/typescript/api-reference/classes/DepositScript.md +++ b/typescript/api-reference/classes/DepositScript.md @@ -43,7 +43,7 @@ by the target wallet during the deposit sweep process. #### Defined in -[src/services/deposits/deposit.ts:189](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L189) +[services/deposits/deposit.ts:189](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L189) ## Properties @@ -56,7 +56,7 @@ and allowing to build a unique deposit script (and address) on Bitcoin chain. #### Defined in -[src/services/deposits/deposit.ts:182](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L182) +[services/deposits/deposit.ts:182](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L182) ___ @@ -69,7 +69,7 @@ should be a witness P2WSH one. If false, legacy P2SH will be used instead. #### Defined in -[src/services/deposits/deposit.ts:187](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L187) +[services/deposits/deposit.ts:187](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L187) ## Methods @@ -93,7 +93,7 @@ Bitcoin address corresponding to this deposit script. #### Defined in -[src/services/deposits/deposit.ts:258](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L258) +[services/deposits/deposit.ts:258](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L258) ___ @@ -109,7 +109,7 @@ Hashed deposit script as Buffer. #### Defined in -[src/services/deposits/deposit.ts:206](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L206) +[services/deposits/deposit.ts:206](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L206) ___ @@ -125,7 +125,7 @@ Plain-text deposit script as a hex string. #### Defined in -[src/services/deposits/deposit.ts:218](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L218) +[services/deposits/deposit.ts:218](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L218) ___ @@ -146,4 +146,4 @@ ___ #### Defined in -[src/services/deposits/deposit.ts:196](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposit.ts#L196) +[services/deposits/deposit.ts:196](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposit.ts#L196) diff --git a/typescript/api-reference/classes/DepositsService.md b/typescript/api-reference/classes/DepositsService.md index 420ed82a8..4554d32e4 100644 --- a/typescript/api-reference/classes/DepositsService.md +++ b/typescript/api-reference/classes/DepositsService.md @@ -36,7 +36,7 @@ Service exposing features related to tBTC v2 deposits. | :------ | :------ | | `tbtcContracts` | [`TBTCContracts`](../README.md#tbtccontracts) | | `bitcoinClient` | [`BitcoinClient`](../interfaces/BitcoinClient.md) | -| `crossChainContracts` | (`_`: ``"Base"``) => `undefined` \| [`CrossChainContracts`](../README.md#crosschaincontracts) | +| `crossChainContracts` | (`_`: [`L2Chain`](../README.md#l2chain)) => `undefined` \| [`CrossChainContracts`](../README.md#crosschaincontracts) | #### Returns @@ -44,13 +44,13 @@ Service exposing features related to tBTC v2 deposits. #### Defined in -[src/services/deposits/deposits-service.ts:51](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposits-service.ts#L51) +[services/deposits/deposits-service.ts:51](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposits-service.ts#L51) ## Properties ### #crossChainContracts -• `Private` `Readonly` **#crossChainContracts**: (`_`: ``"Base"``) => `undefined` \| [`CrossChainContracts`](../README.md#crosschaincontracts) +• `Private` `Readonly` **#crossChainContracts**: (`_`: [`L2Chain`](../README.md#l2chain)) => `undefined` \| [`CrossChainContracts`](../README.md#crosschaincontracts) #### Type declaration @@ -62,7 +62,7 @@ Gets cross-chain contracts for the given supported L2 chain. | Name | Type | Description | | :------ | :------ | :------ | -| `_` | ``"Base"`` | Name of the L2 chain for which to get cross-chain contracts. | +| `_` | [`L2Chain`](../README.md#l2chain) | Name of the L2 chain for which to get cross-chain contracts. | ##### Returns @@ -73,7 +73,7 @@ Cross-chain contracts for the given L2 chain or #### Defined in -[src/services/deposits/deposits-service.ts:49](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposits-service.ts#L49) +[services/deposits/deposits-service.ts:49](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposits-service.ts#L49) ___ @@ -86,7 +86,7 @@ initiated by this service. #### Defined in -[src/services/deposits/deposits-service.ts:42](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposits-service.ts#L42) +[services/deposits/deposits-service.ts:42](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposits-service.ts#L42) ___ @@ -98,7 +98,7 @@ Bitcoin client handle. #### Defined in -[src/services/deposits/deposits-service.ts:37](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposits-service.ts#L37) +[services/deposits/deposits-service.ts:37](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposits-service.ts#L37) ___ @@ -111,7 +111,7 @@ This is 9 month in seconds assuming 1 month = 30 days #### Defined in -[src/services/deposits/deposits-service.ts:29](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposits-service.ts#L29) +[services/deposits/deposits-service.ts:29](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposits-service.ts#L29) ___ @@ -123,7 +123,7 @@ Handle to tBTC contracts. #### Defined in -[src/services/deposits/deposits-service.ts:33](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposits-service.ts#L33) +[services/deposits/deposits-service.ts:33](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposits-service.ts#L33) ## Methods @@ -145,7 +145,7 @@ Handle to tBTC contracts. #### Defined in -[src/services/deposits/deposits-service.ts:183](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposits-service.ts#L183) +[services/deposits/deposits-service.ts:183](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposits-service.ts#L183) ___ @@ -169,7 +169,7 @@ must be initialized along with a L2 signer first. | Name | Type | Description | | :------ | :------ | :------ | | `bitcoinRecoveryAddress` | `string` | P2PKH or P2WPKH Bitcoin address that can be used for emergency recovery of the deposited funds. | -| `l2ChainName` | ``"Base"`` | Name of the L2 chain the deposit is targeting. | +| `l2ChainName` | [`L2Chain`](../README.md#l2chain) | Name of the L2 chain the deposit is targeting. | #### Returns @@ -199,7 +199,7 @@ This is actually a call to initiateDepositWithProxy with a built-in #### Defined in -[src/services/deposits/deposits-service.ts:163](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposits-service.ts#L163) +[services/deposits/deposits-service.ts:163](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposits-service.ts#L163) ___ @@ -233,7 +233,7 @@ Throws an error if one of the following occurs: #### Defined in -[src/services/deposits/deposits-service.ts:76](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposits-service.ts#L76) +[services/deposits/deposits-service.ts:76](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposits-service.ts#L76) ___ @@ -275,7 +275,7 @@ Throws an error if one of the following occurs: #### Defined in -[src/services/deposits/deposits-service.ts:115](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposits-service.ts#L115) +[services/deposits/deposits-service.ts:115](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposits-service.ts#L115) ___ @@ -304,4 +304,4 @@ Typically, there is no need to use this method when DepositsService #### Defined in -[src/services/deposits/deposits-service.ts:261](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/deposits/deposits-service.ts#L261) +[services/deposits/deposits-service.ts:261](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/deposits/deposits-service.ts#L261) diff --git a/typescript/api-reference/classes/ElectrumClient.md b/typescript/api-reference/classes/ElectrumClient.md index 9c0c9a378..7c5080c82 100644 --- a/typescript/api-reference/classes/ElectrumClient.md +++ b/typescript/api-reference/classes/ElectrumClient.md @@ -62,7 +62,7 @@ Electrum-based implementation of the Bitcoin client. #### Defined in -[src/lib/electrum/client.ts:73](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L73) +[lib/electrum/client.ts:73](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L73) ## Properties @@ -72,7 +72,7 @@ Electrum-based implementation of the Bitcoin client. #### Defined in -[src/lib/electrum/client.ts:71](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L71) +[lib/electrum/client.ts:71](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L71) ___ @@ -82,7 +82,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:67](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L67) +[lib/electrum/client.ts:67](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L67) ___ @@ -92,7 +92,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:68](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L68) +[lib/electrum/client.ts:68](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L68) ___ @@ -102,7 +102,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:70](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L70) +[lib/electrum/client.ts:70](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L70) ___ @@ -112,7 +112,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:69](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L69) +[lib/electrum/client.ts:69](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L69) ## Methods @@ -138,7 +138,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:633](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L633) +[lib/electrum/client.ts:633](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L633) ___ @@ -164,7 +164,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:261](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L261) +[lib/electrum/client.ts:261](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L261) ___ @@ -190,7 +190,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:647](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L647) +[lib/electrum/client.ts:647](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L647) ___ @@ -217,7 +217,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:583](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L583) +[lib/electrum/client.ts:583](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L583) ___ @@ -237,7 +237,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:239](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L239) +[lib/electrum/client.ts:239](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L239) ___ @@ -263,7 +263,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:396](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L396) +[lib/electrum/client.ts:396](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L396) ___ @@ -289,7 +289,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:346](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L346) +[lib/electrum/client.ts:346](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L346) ___ @@ -315,7 +315,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:417](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L417) +[lib/electrum/client.ts:417](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L417) ___ @@ -342,7 +342,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:292](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L292) +[lib/electrum/client.ts:292](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L292) ___ @@ -369,7 +369,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:602](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L602) +[lib/electrum/client.ts:602](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L602) ___ @@ -395,7 +395,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:509](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L509) +[lib/electrum/client.ts:509](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L509) ___ @@ -415,7 +415,7 @@ ___ #### Defined in -[src/lib/electrum/client.ts:567](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L567) +[lib/electrum/client.ts:567](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L567) ___ @@ -439,7 +439,7 @@ A function that can retry any function. #### Defined in -[src/lib/electrum/client.ts:231](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L231) +[lib/electrum/client.ts:231](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L231) ___ @@ -470,7 +470,7 @@ Promise holding the outcome. #### Defined in -[src/lib/electrum/client.ts:169](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L169) +[lib/electrum/client.ts:169](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L169) ___ @@ -495,7 +495,7 @@ Electrum client instance. #### Defined in -[src/lib/electrum/client.ts:127](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L127) +[lib/electrum/client.ts:127](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L127) ___ @@ -523,7 +523,7 @@ Electrum client instance. #### Defined in -[src/lib/electrum/client.ts:98](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L98) +[lib/electrum/client.ts:98](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L98) ___ @@ -547,4 +547,4 @@ Electrum credentials object. #### Defined in -[src/lib/electrum/client.ts:148](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L148) +[lib/electrum/client.ts:148](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L148) diff --git a/typescript/api-reference/classes/EthereumAddress.md b/typescript/api-reference/classes/EthereumAddress.md index 08b14f897..0c15ff8fa 100644 --- a/typescript/api-reference/classes/EthereumAddress.md +++ b/typescript/api-reference/classes/EthereumAddress.md @@ -39,7 +39,7 @@ Represents an Ethereum address. #### Defined in -[src/lib/ethereum/address.ts:12](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/address.ts#L12) +[lib/ethereum/address.ts:12](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/address.ts#L12) ## Properties @@ -55,7 +55,7 @@ Identifier as an un-prefixed hex string. #### Defined in -[src/lib/ethereum/address.ts:10](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/address.ts#L10) +[lib/ethereum/address.ts:10](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/address.ts#L10) ## Methods @@ -81,7 +81,7 @@ Checks if two identifiers are equal. #### Defined in -[src/lib/ethereum/address.ts:28](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/address.ts#L28) +[lib/ethereum/address.ts:28](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/address.ts#L28) ___ @@ -101,4 +101,4 @@ ___ #### Defined in -[src/lib/ethereum/address.ts:24](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/address.ts#L24) +[lib/ethereum/address.ts:24](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/address.ts#L24) diff --git a/typescript/api-reference/classes/EthereumBridge.md b/typescript/api-reference/classes/EthereumBridge.md index f414780e7..0091c5c00 100644 --- a/typescript/api-reference/classes/EthereumBridge.md +++ b/typescript/api-reference/classes/EthereumBridge.md @@ -44,6 +44,7 @@ for reference. - [parseRedemptionRequest](EthereumBridge.md#parseredemptionrequest) - [parseWalletDetails](EthereumBridge.md#parsewalletdetails) - [pendingRedemptions](EthereumBridge.md#pendingredemptions) +- [pendingRedemptionsByWalletPKH](EthereumBridge.md#pendingredemptionsbywalletpkh) - [requestRedemption](EthereumBridge.md#requestredemption) - [revealDeposit](EthereumBridge.md#revealdeposit) - [submitDepositSweepProof](EthereumBridge.md#submitdepositsweepproof) @@ -78,7 +79,7 @@ EthersContractHandle\<BridgeTypechain\>.constructor #### Defined in -[src/lib/ethereum/bridge.ts:60](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L60) +[lib/ethereum/bridge.ts:60](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L60) ## Properties @@ -96,7 +97,7 @@ EthersContractHandle.\_deployedAtBlockNumber #### Defined in -[src/lib/ethereum/adapter.ts:80](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) +[lib/ethereum/adapter.ts:80](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) ___ @@ -112,7 +113,7 @@ EthersContractHandle.\_instance #### Defined in -[src/lib/ethereum/adapter.ts:74](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) +[lib/ethereum/adapter.ts:74](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) ___ @@ -128,7 +129,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[src/lib/ethereum/adapter.ts:84](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) +[lib/ethereum/adapter.ts:84](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) ## Methods @@ -148,7 +149,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[src/lib/ethereum/bridge.ts:494](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L494) +[lib/ethereum/bridge.ts:509](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L509) ___ @@ -177,7 +178,7 @@ Builds the UTXO hash based on the UTXO components. UTXO hash is computed as #### Defined in -[src/lib/ethereum/bridge.ts:629](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L629) +[lib/ethereum/bridge.ts:644](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L644) ___ @@ -204,7 +205,7 @@ ___ #### Defined in -[src/lib/ethereum/bridge.ts:429](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L429) +[lib/ethereum/bridge.ts:444](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L444) ___ @@ -226,7 +227,7 @@ EthersContractHandle.getAddress #### Defined in -[src/lib/ethereum/adapter.ts:112](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) +[lib/ethereum/adapter.ts:112](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) ___ @@ -246,7 +247,7 @@ ___ #### Defined in -[src/lib/ethereum/bridge.ts:87](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L87) +[lib/ethereum/bridge.ts:87](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L87) ___ @@ -273,7 +274,7 @@ Bridge.getDepositRevealedEvents #### Defined in -[src/lib/ethereum/bridge.ts:95](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L95) +[lib/ethereum/bridge.ts:95](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L95) ___ @@ -307,7 +308,7 @@ EthersContractHandle.getEvents #### Defined in -[src/lib/ethereum/adapter.ts:127](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) +[lib/ethereum/adapter.ts:127](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) ___ @@ -334,7 +335,7 @@ Bridge.getNewWalletRegisteredEvents #### Defined in -[src/lib/ethereum/bridge.ts:541](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L541) +[lib/ethereum/bridge.ts:556](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L556) ___ @@ -361,7 +362,7 @@ Bridge.getRedemptionRequestedEvents #### Defined in -[src/lib/ethereum/bridge.ts:646](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L646) +[lib/ethereum/bridge.ts:661](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L661) ___ @@ -381,7 +382,7 @@ ___ #### Defined in -[src/lib/ethereum/bridge.ts:515](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L515) +[lib/ethereum/bridge.ts:530](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L530) ___ @@ -405,7 +406,7 @@ Parsed deposit request. #### Defined in -[src/lib/ethereum/bridge.ts:474](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L474) +[lib/ethereum/bridge.ts:489](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L489) ___ @@ -430,7 +431,7 @@ Parsed redemption request. #### Defined in -[src/lib/ethereum/bridge.ts:213](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L213) +[lib/ethereum/bridge.ts:228](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L228) ___ @@ -454,7 +455,7 @@ Parsed wallet data. #### Defined in -[src/lib/ethereum/bridge.ts:600](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L600) +[lib/ethereum/bridge.ts:615](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L615) ___ @@ -481,7 +482,34 @@ ___ #### Defined in -[src/lib/ethereum/bridge.ts:132](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L132) +[lib/ethereum/bridge.ts:132](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L132) + +___ + +### pendingRedemptionsByWalletPKH + +▸ **pendingRedemptionsByWalletPKH**(`walletPublicKeyHash`, `redeemerOutputScript`): `Promise`\<[`RedemptionRequest`](../interfaces/RedemptionRequest.md)\> + +#### Parameters + +| Name | Type | +| :------ | :------ | +| `walletPublicKeyHash` | [`Hex`](Hex.md) | +| `redeemerOutputScript` | [`Hex`](Hex.md) | + +#### Returns + +`Promise`\<[`RedemptionRequest`](../interfaces/RedemptionRequest.md)\> + +**`See`** + +#### Implementation of + +[Bridge](../interfaces/Bridge.md).[pendingRedemptionsByWalletPKH](../interfaces/Bridge.md#pendingredemptionsbywalletpkh) + +#### Defined in + +[lib/ethereum/bridge.ts:147](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L147) ___ @@ -510,7 +538,7 @@ ___ #### Defined in -[src/lib/ethereum/bridge.ts:334](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L334) +[lib/ethereum/bridge.ts:349](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L349) ___ @@ -539,7 +567,7 @@ ___ #### Defined in -[src/lib/ethereum/bridge.ts:231](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L231) +[lib/ethereum/bridge.ts:246](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L246) ___ @@ -568,7 +596,7 @@ ___ #### Defined in -[src/lib/ethereum/bridge.ts:268](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L268) +[lib/ethereum/bridge.ts:283](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L283) ___ @@ -597,7 +625,7 @@ ___ #### Defined in -[src/lib/ethereum/bridge.ts:378](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L378) +[lib/ethereum/bridge.ts:393](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L393) ___ @@ -624,7 +652,7 @@ ___ #### Defined in -[src/lib/ethereum/bridge.ts:155](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L155) +[lib/ethereum/bridge.ts:170](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L170) ___ @@ -644,7 +672,7 @@ ___ #### Defined in -[src/lib/ethereum/bridge.ts:320](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L320) +[lib/ethereum/bridge.ts:335](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L335) ___ @@ -664,7 +692,7 @@ ___ #### Defined in -[src/lib/ethereum/bridge.ts:566](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L566) +[lib/ethereum/bridge.ts:581](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L581) ___ @@ -690,7 +718,7 @@ ___ #### Defined in -[src/lib/ethereum/bridge.ts:583](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L583) +[lib/ethereum/bridge.ts:598](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L598) ___ @@ -715,7 +743,7 @@ Deposit key. #### Defined in -[src/lib/ethereum/bridge.ts:455](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L455) +[lib/ethereum/bridge.ts:470](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L470) ___ @@ -740,4 +768,4 @@ The redemption key. #### Defined in -[src/lib/ethereum/bridge.ts:183](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L183) +[lib/ethereum/bridge.ts:198](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L198) diff --git a/typescript/api-reference/classes/EthereumCrossChainExtraDataEncoder.md b/typescript/api-reference/classes/EthereumCrossChainExtraDataEncoder.md index 370e78311..c84df3178 100644 --- a/typescript/api-reference/classes/EthereumCrossChainExtraDataEncoder.md +++ b/typescript/api-reference/classes/EthereumCrossChainExtraDataEncoder.md @@ -55,7 +55,7 @@ for reference. #### Defined in -[src/lib/ethereum/l1-bitcoin-depositor.ts:154](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L154) +[lib/ethereum/l1-bitcoin-depositor.ts:163](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L163) ___ @@ -81,4 +81,4 @@ ___ #### Defined in -[src/lib/ethereum/l1-bitcoin-depositor.ts:140](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L140) +[lib/ethereum/l1-bitcoin-depositor.ts:149](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L149) diff --git a/typescript/api-reference/classes/EthereumDepositorProxy.md b/typescript/api-reference/classes/EthereumDepositorProxy.md index 334f74953..6d1075f67 100644 --- a/typescript/api-reference/classes/EthereumDepositorProxy.md +++ b/typescript/api-reference/classes/EthereumDepositorProxy.md @@ -46,7 +46,7 @@ for reference. #### Defined in -[src/lib/ethereum/depositor-proxy.ts:16](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/depositor-proxy.ts#L16) +[lib/ethereum/depositor-proxy.ts:16](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/depositor-proxy.ts#L16) ## Properties @@ -56,7 +56,7 @@ for reference. #### Defined in -[src/lib/ethereum/depositor-proxy.ts:14](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/depositor-proxy.ts#L14) +[lib/ethereum/depositor-proxy.ts:14](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/depositor-proxy.ts#L14) ## Methods @@ -76,7 +76,7 @@ for reference. #### Defined in -[src/lib/ethereum/depositor-proxy.ts:28](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/depositor-proxy.ts#L28) +[lib/ethereum/depositor-proxy.ts:28](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/depositor-proxy.ts#L28) ___ @@ -120,7 +120,7 @@ Packed parameters. #### Defined in -[src/lib/ethereum/depositor-proxy.ts:44](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/depositor-proxy.ts#L44) +[lib/ethereum/depositor-proxy.ts:44](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/depositor-proxy.ts#L44) ___ @@ -149,4 +149,4 @@ ___ #### Defined in -[src/lib/ethereum/depositor-proxy.ts:62](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/depositor-proxy.ts#L62) +[lib/ethereum/depositor-proxy.ts:62](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/depositor-proxy.ts#L62) diff --git a/typescript/api-reference/classes/EthereumL1BitcoinDepositor.md b/typescript/api-reference/classes/EthereumL1BitcoinDepositor.md index b6527dc56..e1abd7316 100644 --- a/typescript/api-reference/classes/EthereumL1BitcoinDepositor.md +++ b/typescript/api-reference/classes/EthereumL1BitcoinDepositor.md @@ -50,7 +50,7 @@ for reference. | :------ | :------ | | `config` | [`EthereumContractConfig`](../interfaces/EthereumContractConfig.md) | | `chainId` | [`Ethereum`](../enums/Chains.Ethereum.md) | -| `l2ChainName` | ``"Base"`` | +| `l2ChainName` | [`L2Chain`](../README.md#l2chain) | #### Returns @@ -62,7 +62,7 @@ EthersContractHandle\<L1BitcoinDepositorTypechain\>.constructor #### Defined in -[src/lib/ethereum/l1-bitcoin-depositor.ts:55](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L55) +[lib/ethereum/l1-bitcoin-depositor.ts:64](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L64) ## Properties @@ -72,7 +72,7 @@ EthersContractHandle\<L1BitcoinDepositorTypechain\>.constructor #### Defined in -[src/lib/ethereum/l1-bitcoin-depositor.ts:53](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L53) +[lib/ethereum/l1-bitcoin-depositor.ts:62](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L62) ___ @@ -90,7 +90,7 @@ EthersContractHandle.\_deployedAtBlockNumber #### Defined in -[src/lib/ethereum/adapter.ts:80](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) +[lib/ethereum/adapter.ts:80](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) ___ @@ -106,7 +106,7 @@ EthersContractHandle.\_instance #### Defined in -[src/lib/ethereum/adapter.ts:74](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) +[lib/ethereum/adapter.ts:74](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) ___ @@ -122,7 +122,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[src/lib/ethereum/adapter.ts:84](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) +[lib/ethereum/adapter.ts:84](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) ## Methods @@ -142,7 +142,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[src/lib/ethereum/l1-bitcoin-depositor.ts:90](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L90) +[lib/ethereum/l1-bitcoin-depositor.ts:99](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L99) ___ @@ -164,7 +164,7 @@ EthersContractHandle.getAddress #### Defined in -[src/lib/ethereum/adapter.ts:112](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) +[lib/ethereum/adapter.ts:112](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) ___ @@ -184,7 +184,7 @@ ___ #### Defined in -[src/lib/ethereum/l1-bitcoin-depositor.ts:82](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L82) +[lib/ethereum/l1-bitcoin-depositor.ts:91](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L91) ___ @@ -218,7 +218,7 @@ EthersContractHandle.getEvents #### Defined in -[src/lib/ethereum/adapter.ts:127](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) +[lib/ethereum/adapter.ts:127](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) ___ @@ -247,4 +247,4 @@ ___ #### Defined in -[src/lib/ethereum/l1-bitcoin-depositor.ts:98](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L98) +[lib/ethereum/l1-bitcoin-depositor.ts:107](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts#L107) diff --git a/typescript/api-reference/classes/EthereumTBTCToken.md b/typescript/api-reference/classes/EthereumTBTCToken.md index 0775dbfd5..588e8d0ce 100644 --- a/typescript/api-reference/classes/EthereumTBTCToken.md +++ b/typescript/api-reference/classes/EthereumTBTCToken.md @@ -61,7 +61,7 @@ EthersContractHandle\<TBTCTypechain\>.constructor #### Defined in -[src/lib/ethereum/tbtc-token.ts:26](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-token.ts#L26) +[lib/ethereum/tbtc-token.ts:26](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-token.ts#L26) ## Properties @@ -79,7 +79,7 @@ EthersContractHandle.\_deployedAtBlockNumber #### Defined in -[src/lib/ethereum/adapter.ts:80](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) +[lib/ethereum/adapter.ts:80](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) ___ @@ -95,7 +95,7 @@ EthersContractHandle.\_instance #### Defined in -[src/lib/ethereum/adapter.ts:74](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) +[lib/ethereum/adapter.ts:74](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) ___ @@ -111,7 +111,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[src/lib/ethereum/adapter.ts:84](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) +[lib/ethereum/adapter.ts:84](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) ## Methods @@ -142,7 +142,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[src/lib/ethereum/tbtc-token.ts:139](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-token.ts#L139) +[lib/ethereum/tbtc-token.ts:139](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-token.ts#L139) ___ @@ -171,7 +171,7 @@ ___ #### Defined in -[src/lib/ethereum/tbtc-token.ts:108](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-token.ts#L108) +[lib/ethereum/tbtc-token.ts:108](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-token.ts#L108) ___ @@ -193,7 +193,7 @@ EthersContractHandle.getAddress #### Defined in -[src/lib/ethereum/adapter.ts:112](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) +[lib/ethereum/adapter.ts:112](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) ___ @@ -213,7 +213,7 @@ ___ #### Defined in -[src/lib/ethereum/tbtc-token.ts:53](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-token.ts#L53) +[lib/ethereum/tbtc-token.ts:53](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-token.ts#L53) ___ @@ -247,7 +247,7 @@ EthersContractHandle.getEvents #### Defined in -[src/lib/ethereum/adapter.ts:127](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) +[lib/ethereum/adapter.ts:127](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) ___ @@ -276,7 +276,7 @@ ___ #### Defined in -[src/lib/ethereum/tbtc-token.ts:71](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-token.ts#L71) +[lib/ethereum/tbtc-token.ts:71](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-token.ts#L71) ___ @@ -302,4 +302,4 @@ ___ #### Defined in -[src/lib/ethereum/tbtc-token.ts:61](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-token.ts#L61) +[lib/ethereum/tbtc-token.ts:61](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-token.ts#L61) diff --git a/typescript/api-reference/classes/EthereumTBTCVault.md b/typescript/api-reference/classes/EthereumTBTCVault.md index cf5df7fde..fada9842f 100644 --- a/typescript/api-reference/classes/EthereumTBTCVault.md +++ b/typescript/api-reference/classes/EthereumTBTCVault.md @@ -69,7 +69,7 @@ EthersContractHandle\<TBTCVaultTypechain\>.constructor #### Defined in -[src/lib/ethereum/tbtc-vault.ts:41](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L41) +[lib/ethereum/tbtc-vault.ts:41](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L41) ## Properties @@ -87,7 +87,7 @@ EthersContractHandle.\_deployedAtBlockNumber #### Defined in -[src/lib/ethereum/adapter.ts:80](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) +[lib/ethereum/adapter.ts:80](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) ___ @@ -103,7 +103,7 @@ EthersContractHandle.\_instance #### Defined in -[src/lib/ethereum/adapter.ts:74](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) +[lib/ethereum/adapter.ts:74](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) ___ @@ -119,7 +119,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[src/lib/ethereum/adapter.ts:84](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) +[lib/ethereum/adapter.ts:84](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) ## Methods @@ -146,7 +146,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[src/lib/ethereum/tbtc-vault.ts:150](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L150) +[lib/ethereum/tbtc-vault.ts:150](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L150) ___ @@ -173,7 +173,7 @@ ___ #### Defined in -[src/lib/ethereum/tbtc-vault.ts:173](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L173) +[lib/ethereum/tbtc-vault.ts:173](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L173) ___ @@ -195,7 +195,7 @@ EthersContractHandle.getAddress #### Defined in -[src/lib/ethereum/adapter.ts:112](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) +[lib/ethereum/adapter.ts:112](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) ___ @@ -215,7 +215,7 @@ ___ #### Defined in -[src/lib/ethereum/tbtc-vault.ts:68](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L68) +[lib/ethereum/tbtc-vault.ts:68](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L68) ___ @@ -249,7 +249,7 @@ EthersContractHandle.getEvents #### Defined in -[src/lib/ethereum/adapter.ts:127](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) +[lib/ethereum/adapter.ts:127](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) ___ @@ -269,7 +269,7 @@ ___ #### Defined in -[src/lib/ethereum/tbtc-vault.ts:90](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L90) +[lib/ethereum/tbtc-vault.ts:90](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L90) ___ @@ -296,7 +296,7 @@ TBTCVault.getOptimisticMintingCancelledEvents #### Defined in -[src/lib/ethereum/tbtc-vault.ts:268](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L268) +[lib/ethereum/tbtc-vault.ts:268](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L268) ___ @@ -323,7 +323,7 @@ TBTCVault.getOptimisticMintingFinalizedEvents #### Defined in -[src/lib/ethereum/tbtc-vault.ts:295](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L295) +[lib/ethereum/tbtc-vault.ts:295](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L295) ___ @@ -350,7 +350,7 @@ TBTCVault.getOptimisticMintingRequestedEvents #### Defined in -[src/lib/ethereum/tbtc-vault.ts:235](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L235) +[lib/ethereum/tbtc-vault.ts:235](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L235) ___ @@ -376,7 +376,7 @@ ___ #### Defined in -[src/lib/ethereum/tbtc-vault.ts:114](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L114) +[lib/ethereum/tbtc-vault.ts:114](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L114) ___ @@ -402,7 +402,7 @@ ___ #### Defined in -[src/lib/ethereum/tbtc-vault.ts:104](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L104) +[lib/ethereum/tbtc-vault.ts:104](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L104) ___ @@ -422,7 +422,7 @@ ___ #### Defined in -[src/lib/ethereum/tbtc-vault.ts:76](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L76) +[lib/ethereum/tbtc-vault.ts:76](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L76) ___ @@ -449,7 +449,7 @@ ___ #### Defined in -[src/lib/ethereum/tbtc-vault.ts:199](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L199) +[lib/ethereum/tbtc-vault.ts:199](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L199) ___ @@ -473,7 +473,7 @@ Parsed optimistic minting request. #### Defined in -[src/lib/ethereum/tbtc-vault.ts:222](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L222) +[lib/ethereum/tbtc-vault.ts:222](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L222) ___ @@ -500,4 +500,4 @@ ___ #### Defined in -[src/lib/ethereum/tbtc-vault.ts:124](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L124) +[lib/ethereum/tbtc-vault.ts:124](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/tbtc-vault.ts#L124) diff --git a/typescript/api-reference/classes/EthereumWalletRegistry.md b/typescript/api-reference/classes/EthereumWalletRegistry.md index 78e6b65d6..adcf56e67 100644 --- a/typescript/api-reference/classes/EthereumWalletRegistry.md +++ b/typescript/api-reference/classes/EthereumWalletRegistry.md @@ -61,7 +61,7 @@ EthersContractHandle\<WalletRegistryTypechain\>.constructor #### Defined in -[src/lib/ethereum/wallet-registry.ts:33](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L33) +[lib/ethereum/wallet-registry.ts:33](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L33) ## Properties @@ -79,7 +79,7 @@ EthersContractHandle.\_deployedAtBlockNumber #### Defined in -[src/lib/ethereum/adapter.ts:80](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) +[lib/ethereum/adapter.ts:80](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L80) ___ @@ -95,7 +95,7 @@ EthersContractHandle.\_instance #### Defined in -[src/lib/ethereum/adapter.ts:74](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) +[lib/ethereum/adapter.ts:74](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L74) ___ @@ -111,7 +111,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[src/lib/ethereum/adapter.ts:84](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) +[lib/ethereum/adapter.ts:84](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L84) ## Methods @@ -133,7 +133,7 @@ EthersContractHandle.getAddress #### Defined in -[src/lib/ethereum/adapter.ts:112](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) +[lib/ethereum/adapter.ts:112](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L112) ___ @@ -153,7 +153,7 @@ ___ #### Defined in -[src/lib/ethereum/wallet-registry.ts:60](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L60) +[lib/ethereum/wallet-registry.ts:60](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L60) ___ @@ -180,7 +180,7 @@ WalletRegistry.getDkgResultApprovedEvents #### Defined in -[src/lib/ethereum/wallet-registry.ts:126](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L126) +[lib/ethereum/wallet-registry.ts:126](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L126) ___ @@ -207,7 +207,7 @@ WalletRegistry.getDkgResultChallengedEvents #### Defined in -[src/lib/ethereum/wallet-registry.ts:151](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L151) +[lib/ethereum/wallet-registry.ts:151](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L151) ___ @@ -234,7 +234,7 @@ WalletRegistry.getDkgResultSubmittedEvents #### Defined in -[src/lib/ethereum/wallet-registry.ts:83](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L83) +[lib/ethereum/wallet-registry.ts:83](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L83) ___ @@ -268,7 +268,7 @@ EthersContractHandle.getEvents #### Defined in -[src/lib/ethereum/adapter.ts:127](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) +[lib/ethereum/adapter.ts:127](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L127) ___ @@ -294,4 +294,4 @@ ___ #### Defined in -[src/lib/ethereum/wallet-registry.ts:68](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L68) +[lib/ethereum/wallet-registry.ts:68](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/wallet-registry.ts#L68) diff --git a/typescript/api-reference/classes/Hex.md b/typescript/api-reference/classes/Hex.md index 49646c295..8f6ed0ef0 100644 --- a/typescript/api-reference/classes/Hex.md +++ b/typescript/api-reference/classes/Hex.md @@ -45,7 +45,7 @@ Represents a hexadecimal value. #### Defined in -[src/lib/utils/hex.ts:7](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L7) +[lib/utils/hex.ts:7](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L7) ## Properties @@ -55,7 +55,7 @@ Represents a hexadecimal value. #### Defined in -[src/lib/utils/hex.ts:5](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L5) +[lib/utils/hex.ts:5](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L5) ## Methods @@ -79,7 +79,7 @@ True if both values are equal, false otherwise. #### Defined in -[src/lib/utils/hex.ts:57](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L57) +[lib/utils/hex.ts:57](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L57) ___ @@ -95,7 +95,7 @@ Reversed hexadecimal value. #### Defined in -[src/lib/utils/hex.ts:64](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L64) +[lib/utils/hex.ts:64](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L64) ___ @@ -111,7 +111,7 @@ Hexadecimal value as a Buffer. #### Defined in -[src/lib/utils/hex.ts:32](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L32) +[lib/utils/hex.ts:32](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L32) ___ @@ -127,7 +127,7 @@ Hexadecimal string prefixed with '0x'. #### Defined in -[src/lib/utils/hex.ts:46](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L46) +[lib/utils/hex.ts:46](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L46) ___ @@ -143,7 +143,7 @@ Unprefixed hexadecimal string. #### Defined in -[src/lib/utils/hex.ts:39](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L39) +[lib/utils/hex.ts:39](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L39) ___ @@ -163,4 +163,4 @@ ___ #### Defined in -[src/lib/utils/hex.ts:25](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/hex.ts#L25) +[lib/utils/hex.ts:25](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/utils/hex.ts#L25) diff --git a/typescript/api-reference/classes/LedgerLiveEthereumSigner.md b/typescript/api-reference/classes/LedgerLiveEthereumSigner.md deleted file mode 100644 index f079f00a1..000000000 --- a/typescript/api-reference/classes/LedgerLiveEthereumSigner.md +++ /dev/null @@ -1,660 +0,0 @@ -# Class: LedgerLiveEthereumSigner - -Ethereum signer extended from `ethers` Signer class. The main purpose of it -is to allow the user to communicate with eth contracts through our tBTC SDK -inside Ledger Live application, when the app is used there as a Live App. - -## Hierarchy - -- `Signer` - - ↳ **`LedgerLiveEthereumSigner`** - -## Table of contents - -### Constructors - -- [constructor](LedgerLiveEthereumSigner.md#constructor) - -### Properties - -- [\_account](LedgerLiveEthereumSigner.md#_account) -- [\_isSigner](LedgerLiveEthereumSigner.md#_issigner) -- [\_walletApiClient](LedgerLiveEthereumSigner.md#_walletapiclient) -- [\_windowMessageTransport](LedgerLiveEthereumSigner.md#_windowmessagetransport) -- [provider](LedgerLiveEthereumSigner.md#provider) - -### Accessors - -- [account](LedgerLiveEthereumSigner.md#account) - -### Methods - -- [\_catchWalletApiError](LedgerLiveEthereumSigner.md#_catchwalletapierror) -- [\_checkAccount](LedgerLiveEthereumSigner.md#_checkaccount) -- [\_checkProvider](LedgerLiveEthereumSigner.md#_checkprovider) -- [\_checkProviderAndAccount](LedgerLiveEthereumSigner.md#_checkproviderandaccount) -- [\_getWalletApiEthereumTransaction](LedgerLiveEthereumSigner.md#_getwalletapiethereumtransaction) -- [call](LedgerLiveEthereumSigner.md#call) -- [checkTransaction](LedgerLiveEthereumSigner.md#checktransaction) -- [connect](LedgerLiveEthereumSigner.md#connect) -- [estimateGas](LedgerLiveEthereumSigner.md#estimategas) -- [getAccountId](LedgerLiveEthereumSigner.md#getaccountid) -- [getAddress](LedgerLiveEthereumSigner.md#getaddress) -- [getBalance](LedgerLiveEthereumSigner.md#getbalance) -- [getChainId](LedgerLiveEthereumSigner.md#getchainid) -- [getFeeData](LedgerLiveEthereumSigner.md#getfeedata) -- [getGasPrice](LedgerLiveEthereumSigner.md#getgasprice) -- [getTransactionCount](LedgerLiveEthereumSigner.md#gettransactioncount) -- [populateTransaction](LedgerLiveEthereumSigner.md#populatetransaction) -- [requestAccount](LedgerLiveEthereumSigner.md#requestaccount) -- [resolveName](LedgerLiveEthereumSigner.md#resolvename) -- [sendTransaction](LedgerLiveEthereumSigner.md#sendtransaction) -- [setAccount](LedgerLiveEthereumSigner.md#setaccount) -- [signMessage](LedgerLiveEthereumSigner.md#signmessage) -- [signTransaction](LedgerLiveEthereumSigner.md#signtransaction) -- [isSigner](LedgerLiveEthereumSigner.md#issigner) - -## Constructors - -### constructor - -• **new LedgerLiveEthereumSigner**(`provider?`): [`LedgerLiveEthereumSigner`](LedgerLiveEthereumSigner.md) - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `provider?` | `Provider` | - -#### Returns - -[`LedgerLiveEthereumSigner`](LedgerLiveEthereumSigner.md) - -#### Overrides - -Signer.constructor - -#### Defined in - -[src/lib/utils/ledger.ts:31](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L31) - -## Properties - -### \_account - -• `Private` **\_account**: `undefined` \| `Account` - -#### Defined in - -[src/lib/utils/ledger.ts:29](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L29) - -___ - -### \_isSigner - -• `Readonly` **\_isSigner**: `boolean` - -#### Inherited from - -Signer.\_isSigner - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:29 - -___ - -### \_walletApiClient - -• `Private` **\_walletApiClient**: `WalletAPIClient`\<`CustomModule`, (`client`: `WalletAPIClient`\<`CustomModule`, (client: WalletAPIClient\) =\> CustomModule \| Record\\>) => `CustomModule` \| `Record`\<`string`, `CustomModule`\>\> - -#### Defined in - -[src/lib/utils/ledger.ts:27](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L27) - -___ - -### \_windowMessageTransport - -• `Private` **\_windowMessageTransport**: `default` - -#### Defined in - -[src/lib/utils/ledger.ts:28](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L28) - -___ - -### provider - -• `Optional` `Readonly` **provider**: `Provider` - -#### Inherited from - -Signer.provider - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:24 - -## Accessors - -### account - -• `get` **account**(): `undefined` \| `Account` - -#### Returns - -`undefined` \| `Account` - -#### Defined in - -[src/lib/utils/ledger.ts:61](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L61) - -## Methods - -### \_catchWalletApiError - -▸ **_catchWalletApiError**(`error?`, `defaultErrorMessage?`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `error?` | `any` | -| `defaultErrorMessage?` | `string` | - -#### Returns - -`void` - -#### Defined in - -[src/lib/utils/ledger.ts:49](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L49) - -___ - -### \_checkAccount - -▸ **_checkAccount**(): `void` - -#### Returns - -`void` - -#### Defined in - -[src/lib/utils/ledger.ts:38](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L38) - -___ - -### \_checkProvider - -▸ **_checkProvider**(`operation?`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `operation?` | `string` | - -#### Returns - -`void` - -#### Inherited from - -Signer.\_checkProvider - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:42 - -___ - -### \_checkProviderAndAccount - -▸ **_checkProviderAndAccount**(): `void` - -#### Returns - -`void` - -#### Defined in - -[src/lib/utils/ledger.ts:44](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L44) - -___ - -### \_getWalletApiEthereumTransaction - -▸ **_getWalletApiEthereumTransaction**(`transaction`): `EthereumTransaction` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `transaction` | `TransactionRequest` | - -#### Returns - -`EthereumTransaction` - -#### Defined in - -[src/lib/utils/ledger.ts:98](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L98) - -___ - -### call - -▸ **call**(`transaction`, `blockTag?`): `Promise`\<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `transaction` | `Deferrable`\<`TransactionRequest`\> | -| `blockTag?` | `BlockTag` | - -#### Returns - -`Promise`\<`string`\> - -#### Inherited from - -Signer.call - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:34 - -___ - -### checkTransaction - -▸ **checkTransaction**(`transaction`): `Deferrable`\<`TransactionRequest`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `transaction` | `Deferrable`\<`TransactionRequest`\> | - -#### Returns - -`Deferrable`\<`TransactionRequest`\> - -#### Inherited from - -Signer.checkTransaction - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:40 - -___ - -### connect - -▸ **connect**(`provider`): `Signer` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `provider` | `Provider` | - -#### Returns - -`Signer` - -#### Overrides - -Signer.connect - -#### Defined in - -[src/lib/utils/ledger.ts:221](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L221) - -___ - -### estimateGas - -▸ **estimateGas**(`transaction`): `Promise`\<`BigNumber`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `transaction` | `Deferrable`\<`TransactionRequest`\> | - -#### Returns - -`Promise`\<`BigNumber`\> - -#### Inherited from - -Signer.estimateGas - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:33 - -___ - -### getAccountId - -▸ **getAccountId**(): `string` - -#### Returns - -`string` - -#### Defined in - -[src/lib/utils/ledger.ts:88](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L88) - -___ - -### getAddress - -▸ **getAddress**(): `Promise`\<`string`\> - -#### Returns - -`Promise`\<`string`\> - -#### Overrides - -Signer.getAddress - -#### Defined in - -[src/lib/utils/ledger.ts:93](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L93) - -___ - -### getBalance - -▸ **getBalance**(`blockTag?`): `Promise`\<`BigNumber`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `blockTag?` | `BlockTag` | - -#### Returns - -`Promise`\<`BigNumber`\> - -#### Inherited from - -Signer.getBalance - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:31 - -___ - -### getChainId - -▸ **getChainId**(): `Promise`\<`number`\> - -#### Returns - -`Promise`\<`number`\> - -#### Inherited from - -Signer.getChainId - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:36 - -___ - -### getFeeData - -▸ **getFeeData**(): `Promise`\<`FeeData`\> - -#### Returns - -`Promise`\<`FeeData`\> - -#### Inherited from - -Signer.getFeeData - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:38 - -___ - -### getGasPrice - -▸ **getGasPrice**(): `Promise`\<`BigNumber`\> - -#### Returns - -`Promise`\<`BigNumber`\> - -#### Inherited from - -Signer.getGasPrice - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:37 - -___ - -### getTransactionCount - -▸ **getTransactionCount**(`blockTag?`): `Promise`\<`number`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `blockTag?` | `BlockTag` | - -#### Returns - -`Promise`\<`number`\> - -#### Inherited from - -Signer.getTransactionCount - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:32 - -___ - -### populateTransaction - -▸ **populateTransaction**(`transaction`): `Promise`\<`TransactionRequest`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `transaction` | `Deferrable`\<`TransactionRequest`\> | - -#### Returns - -`Promise`\<`TransactionRequest`\> - -#### Inherited from - -Signer.populateTransaction - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:41 - -___ - -### requestAccount - -▸ **requestAccount**(`params`): `Promise`\<`Account`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `params` | `undefined` \| \{ `currencyIds?`: `string`[] } | - -#### Returns - -`Promise`\<`Account`\> - -#### Defined in - -[src/lib/utils/ledger.ts:69](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L69) - -___ - -### resolveName - -▸ **resolveName**(`name`): `Promise`\<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `name` | `string` | - -#### Returns - -`Promise`\<`string`\> - -#### Inherited from - -Signer.resolveName - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:39 - -___ - -### sendTransaction - -▸ **sendTransaction**(`transaction`): `Promise`\<`TransactionResponse`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `transaction` | `Deferrable`\<`TransactionRequest`\> | - -#### Returns - -`Promise`\<`TransactionResponse`\> - -#### Overrides - -Signer.sendTransaction - -#### Defined in - -[src/lib/utils/ledger.ts:185](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L185) - -___ - -### setAccount - -▸ **setAccount**(`account`): `void` - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `account` | `undefined` \| `Account` | - -#### Returns - -`void` - -#### Defined in - -[src/lib/utils/ledger.ts:65](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L65) - -___ - -### signMessage - -▸ **signMessage**(`message`): `Promise`\<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `message` | `string` | - -#### Returns - -`Promise`\<`string`\> - -#### Overrides - -Signer.signMessage - -#### Defined in - -[src/lib/utils/ledger.ts:138](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L138) - -___ - -### signTransaction - -▸ **signTransaction**(`transaction`): `Promise`\<`string`\> - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `transaction` | `TransactionRequest` | - -#### Returns - -`Promise`\<`string`\> - -#### Overrides - -Signer.signTransaction - -#### Defined in - -[src/lib/utils/ledger.ts:159](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/utils/ledger.ts#L159) - -___ - -### isSigner - -▸ **isSigner**(`value`): value is Signer - -#### Parameters - -| Name | Type | -| :------ | :------ | -| `value` | `any` | - -#### Returns - -value is Signer - -#### Inherited from - -Signer.isSigner - -#### Defined in - -node_modules/@ethersproject/contracts/node_modules/@ethersproject/abstract-signer/lib/index.d.ts:43 diff --git a/typescript/api-reference/classes/MaintenanceService.md b/typescript/api-reference/classes/MaintenanceService.md index f565a1cd9..0ee9c7eda 100644 --- a/typescript/api-reference/classes/MaintenanceService.md +++ b/typescript/api-reference/classes/MaintenanceService.md @@ -33,7 +33,7 @@ operators of the tBTC v2 system. #### Defined in -[src/services/maintenance/maintenance-service.ts:20](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/maintenance-service.ts#L20) +[services/maintenance/maintenance-service.ts:20](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/maintenance-service.ts#L20) ## Properties @@ -45,7 +45,7 @@ Features for optimistic minting maintainers. #### Defined in -[src/services/maintenance/maintenance-service.ts:14](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/maintenance-service.ts#L14) +[services/maintenance/maintenance-service.ts:14](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/maintenance-service.ts#L14) ___ @@ -57,4 +57,4 @@ Features for SPV proof maintainers. #### Defined in -[src/services/maintenance/maintenance-service.ts:18](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/maintenance-service.ts#L18) +[services/maintenance/maintenance-service.ts:18](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/maintenance-service.ts#L18) diff --git a/typescript/api-reference/classes/OptimisticMinting.md b/typescript/api-reference/classes/OptimisticMinting.md index 21883c613..bd22708a0 100644 --- a/typescript/api-reference/classes/OptimisticMinting.md +++ b/typescript/api-reference/classes/OptimisticMinting.md @@ -35,7 +35,7 @@ #### Defined in -[src/services/maintenance/optimistic-minting.ts:9](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/optimistic-minting.ts#L9) +[services/maintenance/optimistic-minting.ts:9](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/optimistic-minting.ts#L9) ## Properties @@ -45,7 +45,7 @@ #### Defined in -[src/services/maintenance/optimistic-minting.ts:7](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/optimistic-minting.ts#L7) +[services/maintenance/optimistic-minting.ts:7](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/optimistic-minting.ts#L7) ## Methods @@ -70,7 +70,7 @@ Transaction hash of the optimistic mint cancel transaction. #### Defined in -[src/services/maintenance/optimistic-minting.ts:37](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/optimistic-minting.ts#L37) +[services/maintenance/optimistic-minting.ts:37](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/optimistic-minting.ts#L37) ___ @@ -95,7 +95,7 @@ Transaction hash of the optimistic mint finalize transaction. #### Defined in -[src/services/maintenance/optimistic-minting.ts:54](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/optimistic-minting.ts#L54) +[services/maintenance/optimistic-minting.ts:54](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/optimistic-minting.ts#L54) ___ @@ -120,7 +120,7 @@ Optimistic minting request. #### Defined in -[src/services/maintenance/optimistic-minting.ts:71](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/optimistic-minting.ts#L71) +[services/maintenance/optimistic-minting.ts:71](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/optimistic-minting.ts#L71) ___ @@ -145,4 +145,4 @@ Transaction hash of the optimistic mint request transaction. #### Defined in -[src/services/maintenance/optimistic-minting.ts:20](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/optimistic-minting.ts#L20) +[services/maintenance/optimistic-minting.ts:20](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/optimistic-minting.ts#L20) diff --git a/typescript/api-reference/classes/RedemptionsService.md b/typescript/api-reference/classes/RedemptionsService.md index 8d1c8cf8f..1c4893f18 100644 --- a/typescript/api-reference/classes/RedemptionsService.md +++ b/typescript/api-reference/classes/RedemptionsService.md @@ -41,7 +41,7 @@ Service exposing features related to tBTC v2 redemptions. #### Defined in -[src/services/redemptions/redemptions-service.ts:31](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L31) +[services/redemptions/redemptions-service.ts:31](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L31) ## Properties @@ -53,7 +53,7 @@ Bitcoin client handle. #### Defined in -[src/services/redemptions/redemptions-service.ts:29](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L29) +[services/redemptions/redemptions-service.ts:29](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L29) ___ @@ -65,7 +65,7 @@ Handle to tBTC contracts. #### Defined in -[src/services/redemptions/redemptions-service.ts:25](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L25) +[services/redemptions/redemptions-service.ts:25](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L25) ## Methods @@ -92,7 +92,7 @@ Object containing: #### Defined in -[src/services/redemptions/redemptions-service.ts:132](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L132) +[services/redemptions/redemptions-service.ts:132](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L132) ___ @@ -119,7 +119,7 @@ Promise holding the wallet main UTXO or undefined value. #### Defined in -[src/services/redemptions/redemptions-service.ts:300](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L300) +[services/redemptions/redemptions-service.ts:300](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L300) ___ @@ -145,7 +145,7 @@ Promise with the wallet details needed to request a redemption. #### Defined in -[src/services/redemptions/redemptions-service.ts:181](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L181) +[services/redemptions/redemptions-service.ts:181](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L181) ___ @@ -176,7 +176,7 @@ Throws an error if no redemption request exists for the given #### Defined in -[src/services/redemptions/redemptions-service.ts:412](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L412) +[services/redemptions/redemptions-service.ts:412](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L412) ___ @@ -205,7 +205,7 @@ Object containing: #### Defined in -[src/services/redemptions/redemptions-service.ts:49](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L49) +[services/redemptions/redemptions-service.ts:49](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L49) ___ @@ -237,4 +237,4 @@ Object containing: #### Defined in -[src/services/redemptions/redemptions-service.ts:88](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L88) +[services/redemptions/redemptions-service.ts:88](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/redemptions/redemptions-service.ts#L88) diff --git a/typescript/api-reference/classes/Spv.md b/typescript/api-reference/classes/Spv.md index e48f8da79..9dfe07ca9 100644 --- a/typescript/api-reference/classes/Spv.md +++ b/typescript/api-reference/classes/Spv.md @@ -35,7 +35,7 @@ #### Defined in -[src/services/maintenance/spv.ts:21](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/spv.ts#L21) +[services/maintenance/spv.ts:21](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/spv.ts#L21) ## Properties @@ -47,7 +47,7 @@ Bitcoin client handle. #### Defined in -[src/services/maintenance/spv.ts:19](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/spv.ts#L19) +[services/maintenance/spv.ts:19](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/spv.ts#L19) ___ @@ -59,7 +59,7 @@ Handle to tBTC contracts. #### Defined in -[src/services/maintenance/spv.ts:15](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/spv.ts#L15) +[services/maintenance/spv.ts:15](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/spv.ts#L15) ## Methods @@ -86,7 +86,7 @@ Empty promise. #### Defined in -[src/services/maintenance/spv.ts:34](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/spv.ts#L34) +[services/maintenance/spv.ts:34](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/spv.ts#L34) ___ @@ -113,4 +113,4 @@ Empty promise. #### Defined in -[src/services/maintenance/spv.ts:67](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/spv.ts#L67) +[services/maintenance/spv.ts:67](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/spv.ts#L67) diff --git a/typescript/api-reference/classes/TBTC.md b/typescript/api-reference/classes/TBTC.md index 4fa1966aa..2b0e3c97e 100644 --- a/typescript/api-reference/classes/TBTC.md +++ b/typescript/api-reference/classes/TBTC.md @@ -47,13 +47,13 @@ Entrypoint component of the tBTC v2 SDK. #### Defined in -[src/services/tbtc.ts:59](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L59) +[services/tbtc.ts:60](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L60) ## Properties ### #crossChainContracts -• `Private` `Readonly` **#crossChainContracts**: `Map`\<``"Base"``, [`CrossChainContracts`](../README.md#crosschaincontracts)\> +• `Private` `Readonly` **#crossChainContracts**: `Map`\<[`L2Chain`](../README.md#l2chain), [`CrossChainContracts`](../README.md#crosschaincontracts)\> Mapping of cross-chain contracts for different supported L2 chains. Each set of cross-chain contracts must be first initialized using @@ -61,7 +61,7 @@ the `initializeCrossChain` method. #### Defined in -[src/services/tbtc.ts:57](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L57) +[services/tbtc.ts:58](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L58) ___ @@ -73,7 +73,7 @@ Reference to the cross-chain contracts loader. #### Defined in -[src/services/tbtc.ts:51](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L51) +[services/tbtc.ts:52](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L52) ___ @@ -85,7 +85,7 @@ Bitcoin client handle for low-level access. #### Defined in -[src/services/tbtc.ts:47](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L47) +[services/tbtc.ts:48](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L48) ___ @@ -97,7 +97,7 @@ Service supporting the tBTC v2 deposit flow. #### Defined in -[src/services/tbtc.ts:30](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L30) +[services/tbtc.ts:31](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L31) ___ @@ -110,7 +110,7 @@ and operators. #### Defined in -[src/services/tbtc.ts:35](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L35) +[services/tbtc.ts:36](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L36) ___ @@ -122,7 +122,7 @@ Service supporting the tBTC v2 redemption flow. #### Defined in -[src/services/tbtc.ts:39](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L39) +[services/tbtc.ts:40](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L40) ___ @@ -134,7 +134,7 @@ Handle to tBTC contracts for low-level access. #### Defined in -[src/services/tbtc.ts:43](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L43) +[services/tbtc.ts:44](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L44) ## Methods @@ -155,7 +155,7 @@ The given L2 chain contracts must be first initialized using the | Name | Type | Description | | :------ | :------ | :------ | -| `l2ChainName` | ``"Base"`` | Name of the L2 chain for which to get cross-chain contracts. | +| `l2ChainName` | [`L2Chain`](../README.md#l2chain) | Name of the L2 chain for which to get cross-chain contracts. | #### Returns @@ -166,7 +166,7 @@ Cross-chain contracts for the given L2 chain or #### Defined in -[src/services/tbtc.ts:252](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L252) +[services/tbtc.ts:273](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L273) ___ @@ -186,7 +186,7 @@ given signer. Updates the signer on subsequent calls. | Name | Type | Description | | :------ | :------ | :------ | -| `l2ChainName` | ``"Base"`` | Name of the L2 chain for which to initialize cross-chain contracts. | +| `l2ChainName` | [`L2Chain`](../README.md#l2chain) | Name of the L2 chain for which to initialize cross-chain contracts. | | `l2Signer` | [`EthereumSigner`](../README.md#ethereumsigner) | Signer to use with the L2 chain contracts. | #### Returns @@ -210,7 +210,7 @@ In case this function needs to support non-EVM L2 chains that can't #### Defined in -[src/services/tbtc.ts:198](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L198) +[services/tbtc.ts:209](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L209) ___ @@ -242,7 +242,7 @@ This function is especially useful for local development as it gives #### Defined in -[src/services/tbtc.ts:170](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L170) +[services/tbtc.ts:181](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L181) ___ @@ -276,13 +276,13 @@ Throws an error if the underlying signer's Ethereum network is #### Defined in -[src/services/tbtc.ts:123](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L123) +[services/tbtc.ts:134](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L134) ___ ### initializeMainnet -▸ **initializeMainnet**(`signer`): `Promise`\<[`TBTC`](TBTC.md)\> +▸ **initializeMainnet**(`signer`, `crossChainSupport?`): `Promise`\<[`TBTC`](TBTC.md)\> Initializes the tBTC v2 SDK entrypoint for Ethereum and Bitcoin mainnets. The initialized instance uses default Electrum servers to interact @@ -290,9 +290,10 @@ with Bitcoin mainnet #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `signer` | [`EthereumSigner`](../README.md#ethereumsigner) | Ethereum signer. | +| Name | Type | Default value | Description | +| :------ | :------ | :------ | :------ | +| `signer` | [`EthereumSigner`](../README.md#ethereumsigner) | `undefined` | Ethereum signer. | +| `crossChainSupport` | `boolean` | `false` | Whether to enable cross-chain support. False by default. | #### Returns @@ -307,13 +308,13 @@ Throws an error if the signer's Ethereum network is other than #### Defined in -[src/services/tbtc.ts:86](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L86) +[services/tbtc.ts:88](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L88) ___ ### initializeSepolia -▸ **initializeSepolia**(`signer`): `Promise`\<[`TBTC`](TBTC.md)\> +▸ **initializeSepolia**(`signer`, `crossChainSupport?`): `Promise`\<[`TBTC`](TBTC.md)\> Initializes the tBTC v2 SDK entrypoint for Ethereum Sepolia and Bitcoin testnet. The initialized instance uses default Electrum servers to interact @@ -321,9 +322,10 @@ with Bitcoin testnet #### Parameters -| Name | Type | Description | -| :------ | :------ | :------ | -| `signer` | [`EthereumSigner`](../README.md#ethereumsigner) | Ethereum signer. | +| Name | Type | Default value | Description | +| :------ | :------ | :------ | :------ | +| `signer` | [`EthereumSigner`](../README.md#ethereumsigner) | `undefined` | Ethereum signer. | +| `crossChainSupport` | `boolean` | `false` | Whether to enable cross-chain support. False by default. | #### Returns @@ -338,4 +340,4 @@ Throws an error if the signer's Ethereum network is other than #### Defined in -[src/services/tbtc.ts:103](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/tbtc.ts#L103) +[services/tbtc.ts:110](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/tbtc.ts#L110) diff --git a/typescript/api-reference/classes/WalletTx.md b/typescript/api-reference/classes/WalletTx.md index 93b406471..1267e9cd2 100644 --- a/typescript/api-reference/classes/WalletTx.md +++ b/typescript/api-reference/classes/WalletTx.md @@ -40,7 +40,7 @@ using threshold signature schemes. #### Defined in -[src/services/maintenance/wallet-tx.ts:48](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/wallet-tx.ts#L48) +[services/maintenance/wallet-tx.ts:48](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/wallet-tx.ts#L48) ## Properties @@ -50,7 +50,7 @@ using threshold signature schemes. #### Defined in -[src/services/maintenance/wallet-tx.ts:45](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/wallet-tx.ts#L45) +[services/maintenance/wallet-tx.ts:45](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/wallet-tx.ts#L45) ___ @@ -60,4 +60,4 @@ ___ #### Defined in -[src/services/maintenance/wallet-tx.ts:46](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/maintenance/wallet-tx.ts#L46) +[services/maintenance/wallet-tx.ts:46](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/maintenance/wallet-tx.ts#L46) diff --git a/typescript/api-reference/enums/BitcoinNetwork-1.md b/typescript/api-reference/enums/BitcoinNetwork-1.md index 4045a9027..ed0770799 100644 --- a/typescript/api-reference/enums/BitcoinNetwork-1.md +++ b/typescript/api-reference/enums/BitcoinNetwork-1.md @@ -20,7 +20,7 @@ Bitcoin Mainnet. #### Defined in -[src/lib/bitcoin/network.ts:20](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/network.ts#L20) +[lib/bitcoin/network.ts:20](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/network.ts#L20) ___ @@ -32,7 +32,7 @@ Bitcoin Testnet. #### Defined in -[src/lib/bitcoin/network.ts:16](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/network.ts#L16) +[lib/bitcoin/network.ts:16](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/network.ts#L16) ___ @@ -44,4 +44,4 @@ Unknown network. #### Defined in -[src/lib/bitcoin/network.ts:12](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/network.ts#L12) +[lib/bitcoin/network.ts:12](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/network.ts#L12) diff --git a/typescript/api-reference/enums/Chains.Arbitrum.md b/typescript/api-reference/enums/Chains.Arbitrum.md new file mode 100644 index 000000000..c998c802b --- /dev/null +++ b/typescript/api-reference/enums/Chains.Arbitrum.md @@ -0,0 +1,30 @@ +# Enumeration: Arbitrum + +[Chains](../modules/Chains.md).Arbitrum + +## Table of contents + +### Enumeration Members + +- [Arbitrum](Chains.Arbitrum.md#arbitrum) +- [ArbitrumSepolia](Chains.Arbitrum.md#arbitrumsepolia) + +## Enumeration Members + +### Arbitrum + +• **Arbitrum** = ``"42161"`` + +#### Defined in + +[lib/contracts/chain.ts:18](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain.ts#L18) + +___ + +### ArbitrumSepolia + +• **ArbitrumSepolia** = ``"421614"`` + +#### Defined in + +[lib/contracts/chain.ts:19](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain.ts#L19) diff --git a/typescript/api-reference/enums/Chains.Base.md b/typescript/api-reference/enums/Chains.Base.md index 535d23c8f..0a2d6391c 100644 --- a/typescript/api-reference/enums/Chains.Base.md +++ b/typescript/api-reference/enums/Chains.Base.md @@ -17,7 +17,7 @@ #### Defined in -[src/lib/contracts/chain.ts:13](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain.ts#L13) +[lib/contracts/chain.ts:13](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain.ts#L13) ___ @@ -27,4 +27,4 @@ ___ #### Defined in -[src/lib/contracts/chain.ts:14](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain.ts#L14) +[lib/contracts/chain.ts:14](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain.ts#L14) diff --git a/typescript/api-reference/enums/Chains.Ethereum.md b/typescript/api-reference/enums/Chains.Ethereum.md index 88dc17e11..37817641b 100644 --- a/typescript/api-reference/enums/Chains.Ethereum.md +++ b/typescript/api-reference/enums/Chains.Ethereum.md @@ -18,7 +18,7 @@ #### Defined in -[src/lib/contracts/chain.ts:9](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain.ts#L9) +[lib/contracts/chain.ts:9](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain.ts#L9) ___ @@ -28,7 +28,7 @@ ___ #### Defined in -[src/lib/contracts/chain.ts:7](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain.ts#L7) +[lib/contracts/chain.ts:7](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain.ts#L7) ___ @@ -38,4 +38,4 @@ ___ #### Defined in -[src/lib/contracts/chain.ts:8](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain.ts#L8) +[lib/contracts/chain.ts:8](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain.ts#L8) diff --git a/typescript/api-reference/enums/WalletState-1.md b/typescript/api-reference/enums/WalletState-1.md index 011449fca..5b14f613b 100644 --- a/typescript/api-reference/enums/WalletState-1.md +++ b/typescript/api-reference/enums/WalletState-1.md @@ -22,7 +22,7 @@ any action in the Bridge. #### Defined in -[src/lib/contracts/bridge.ts:381](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L381) +[lib/contracts/bridge.ts:395](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L395) ___ @@ -36,7 +36,7 @@ and must defend against them. #### Defined in -[src/lib/contracts/bridge.ts:376](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L376) +[lib/contracts/bridge.ts:390](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L390) ___ @@ -48,7 +48,7 @@ The wallet can sweep deposits and accept redemption requests. #### Defined in -[src/lib/contracts/bridge.ts:363](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L363) +[lib/contracts/bridge.ts:377](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L377) ___ @@ -63,7 +63,7 @@ accepted. #### Defined in -[src/lib/contracts/bridge.ts:370](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L370) +[lib/contracts/bridge.ts:384](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L384) ___ @@ -78,7 +78,7 @@ any actions in the Bridge. #### Defined in -[src/lib/contracts/bridge.ts:388](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L388) +[lib/contracts/bridge.ts:402](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L402) ___ @@ -90,4 +90,4 @@ The wallet is unknown to the Bridge. #### Defined in -[src/lib/contracts/bridge.ts:359](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L359) +[lib/contracts/bridge.ts:373](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L373) diff --git a/typescript/api-reference/interfaces/BitcoinClient.md b/typescript/api-reference/interfaces/BitcoinClient.md index 5f5faa90b..cab8f86c2 100644 --- a/typescript/api-reference/interfaces/BitcoinClient.md +++ b/typescript/api-reference/interfaces/BitcoinClient.md @@ -43,7 +43,7 @@ Broadcasts the given transaction over the network. #### Defined in -[src/lib/bitcoin/client.ts:103](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L103) +[lib/bitcoin/client.ts:103](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/client.ts#L103) ___ @@ -69,7 +69,7 @@ List of UTXOs. #### Defined in -[src/lib/bitcoin/client.ts:23](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L23) +[lib/bitcoin/client.ts:23](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/client.ts#L23) ___ @@ -91,7 +91,7 @@ Gets the hash of the coinbase transaction for the given block height. #### Defined in -[src/lib/bitcoin/client.ts:109](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L109) +[lib/bitcoin/client.ts:109](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/client.ts#L109) ___ @@ -116,7 +116,7 @@ Concatenation of block headers in a hexadecimal format. #### Defined in -[src/lib/bitcoin/client.ts:86](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L86) +[lib/bitcoin/client.ts:86](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/client.ts#L86) ___ @@ -134,7 +134,7 @@ Bitcoin network. #### Defined in -[src/lib/bitcoin/client.ts:14](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L14) +[lib/bitcoin/client.ts:14](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/client.ts#L14) ___ @@ -158,7 +158,7 @@ Raw transaction. #### Defined in -[src/lib/bitcoin/client.ts:49](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L49) +[lib/bitcoin/client.ts:49](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/client.ts#L49) ___ @@ -182,7 +182,7 @@ Transaction object. #### Defined in -[src/lib/bitcoin/client.ts:42](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L42) +[lib/bitcoin/client.ts:42](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/client.ts#L42) ___ @@ -207,7 +207,7 @@ The number of confirmations. #### Defined in -[src/lib/bitcoin/client.ts:57](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L57) +[lib/bitcoin/client.ts:57](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/client.ts#L57) ___ @@ -233,7 +233,7 @@ at the moment of request. #### Defined in -[src/lib/bitcoin/client.ts:35](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L35) +[lib/bitcoin/client.ts:35](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/client.ts#L35) ___ @@ -258,7 +258,7 @@ Merkle branch. #### Defined in -[src/lib/bitcoin/client.ts:94](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L94) +[lib/bitcoin/client.ts:94](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/client.ts#L94) ___ @@ -288,7 +288,7 @@ Array of confirmed transaction hashes related to the provided #### Defined in -[src/lib/bitcoin/client.ts:71](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L71) +[lib/bitcoin/client.ts:71](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/client.ts#L71) ___ @@ -306,4 +306,4 @@ Height of the last mined block. #### Defined in -[src/lib/bitcoin/client.ts:77](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/client.ts#L77) +[lib/bitcoin/client.ts:77](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/client.ts#L77) diff --git a/typescript/api-reference/interfaces/BitcoinHeader.md b/typescript/api-reference/interfaces/BitcoinHeader.md index b66bf7c90..7125129f0 100644 --- a/typescript/api-reference/interfaces/BitcoinHeader.md +++ b/typescript/api-reference/interfaces/BitcoinHeader.md @@ -25,7 +25,7 @@ less than or equal to. The field is 4-byte long. #### Defined in -[src/lib/bitcoin/header.ts:37](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/header.ts#L37) +[lib/bitcoin/header.ts:37](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/header.ts#L37) ___ @@ -38,7 +38,7 @@ The field is 32-byte long. #### Defined in -[src/lib/bitcoin/header.ts:25](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/header.ts#L25) +[lib/bitcoin/header.ts:25](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/header.ts#L25) ___ @@ -52,7 +52,7 @@ produce a hash less than or equal to the target threshold. The field is #### Defined in -[src/lib/bitcoin/header.ts:44](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/header.ts#L44) +[lib/bitcoin/header.ts:44](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/header.ts#L44) ___ @@ -64,7 +64,7 @@ The hash of the previous block's header. The field is 32-byte long. #### Defined in -[src/lib/bitcoin/header.ts:19](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/header.ts#L19) +[lib/bitcoin/header.ts:19](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/header.ts#L19) ___ @@ -77,7 +77,7 @@ The Unix epoch time when the miner started hashing the header. The field is #### Defined in -[src/lib/bitcoin/header.ts:31](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/header.ts#L31) +[lib/bitcoin/header.ts:31](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/header.ts#L31) ___ @@ -90,4 +90,4 @@ to follow. The field is 4-byte long. #### Defined in -[src/lib/bitcoin/header.ts:14](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/header.ts#L14) +[lib/bitcoin/header.ts:14](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/header.ts#L14) diff --git a/typescript/api-reference/interfaces/BitcoinRawTx.md b/typescript/api-reference/interfaces/BitcoinRawTx.md index 248c75209..264d62333 100644 --- a/typescript/api-reference/interfaces/BitcoinRawTx.md +++ b/typescript/api-reference/interfaces/BitcoinRawTx.md @@ -18,4 +18,4 @@ The full transaction payload as an un-prefixed hex string. #### Defined in -[src/lib/bitcoin/tx.ts:22](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L22) +[lib/bitcoin/tx.ts:22](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L22) diff --git a/typescript/api-reference/interfaces/BitcoinRawTxVectors.md b/typescript/api-reference/interfaces/BitcoinRawTxVectors.md index ace8204a6..0d52010c2 100644 --- a/typescript/api-reference/interfaces/BitcoinRawTxVectors.md +++ b/typescript/api-reference/interfaces/BitcoinRawTxVectors.md @@ -22,7 +22,7 @@ as a hex string. #### Defined in -[src/lib/bitcoin/tx.ts:113](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L113) +[lib/bitcoin/tx.ts:113](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L113) ___ @@ -34,7 +34,7 @@ Transaction locktime as a hex string. #### Defined in -[src/lib/bitcoin/tx.ts:124](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L124) +[lib/bitcoin/tx.ts:124](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L124) ___ @@ -47,7 +47,7 @@ as a hex string. #### Defined in -[src/lib/bitcoin/tx.ts:119](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L119) +[lib/bitcoin/tx.ts:119](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L119) ___ @@ -59,4 +59,4 @@ Transaction version as a hex string. #### Defined in -[src/lib/bitcoin/tx.ts:107](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L107) +[lib/bitcoin/tx.ts:107](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L107) diff --git a/typescript/api-reference/interfaces/BitcoinSpvProof.md b/typescript/api-reference/interfaces/BitcoinSpvProof.md index 8141fc10c..bba427607 100644 --- a/typescript/api-reference/interfaces/BitcoinSpvProof.md +++ b/typescript/api-reference/interfaces/BitcoinSpvProof.md @@ -24,7 +24,7 @@ Concatenated block headers in hexadecimal format. Each block header is #### Defined in -[src/lib/bitcoin/spv.ts:31](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/spv.ts#L31) +[lib/bitcoin/spv.ts:31](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/spv.ts#L31) ___ @@ -37,7 +37,7 @@ the sha256 hash of the coinbase transaction. #### Defined in -[src/lib/bitcoin/spv.ts:37](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/spv.ts#L37) +[lib/bitcoin/spv.ts:37](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/spv.ts#L37) ___ @@ -49,7 +49,7 @@ Merkle proof of coinbase transaction inclusion in a block. #### Defined in -[src/lib/bitcoin/spv.ts:42](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/spv.ts#L42) +[lib/bitcoin/spv.ts:42](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/spv.ts#L42) ___ @@ -61,7 +61,7 @@ The merkle proof of transaction inclusion in a block. #### Defined in -[src/lib/bitcoin/spv.ts:20](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/spv.ts#L20) +[lib/bitcoin/spv.ts:20](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/spv.ts#L20) ___ @@ -73,4 +73,4 @@ Transaction index in the block (0-indexed). #### Defined in -[src/lib/bitcoin/spv.ts:25](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/spv.ts#L25) +[lib/bitcoin/spv.ts:25](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/spv.ts#L25) diff --git a/typescript/api-reference/interfaces/BitcoinTx.md b/typescript/api-reference/interfaces/BitcoinTx.md index 982a28136..d564dc0f3 100644 --- a/typescript/api-reference/interfaces/BitcoinTx.md +++ b/typescript/api-reference/interfaces/BitcoinTx.md @@ -20,7 +20,7 @@ The vector of transaction inputs. #### Defined in -[src/lib/bitcoin/tx.ts:37](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L37) +[lib/bitcoin/tx.ts:37](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L37) ___ @@ -32,7 +32,7 @@ The vector of transaction outputs. #### Defined in -[src/lib/bitcoin/tx.ts:42](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L42) +[lib/bitcoin/tx.ts:42](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L42) ___ @@ -44,4 +44,4 @@ The transaction hash (or transaction ID) as an un-prefixed hex string. #### Defined in -[src/lib/bitcoin/tx.ts:32](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L32) +[lib/bitcoin/tx.ts:32](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L32) diff --git a/typescript/api-reference/interfaces/BitcoinTxMerkleBranch.md b/typescript/api-reference/interfaces/BitcoinTxMerkleBranch.md index aca610752..27871ea8c 100644 --- a/typescript/api-reference/interfaces/BitcoinTxMerkleBranch.md +++ b/typescript/api-reference/interfaces/BitcoinTxMerkleBranch.md @@ -20,7 +20,7 @@ The height of the block the transaction was confirmed in. #### Defined in -[src/lib/bitcoin/spv.ts:52](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/spv.ts#L52) +[lib/bitcoin/spv.ts:52](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/spv.ts#L52) ___ @@ -34,7 +34,7 @@ the deepest pairing first. Each hash is an unprefixed hex string. #### Defined in -[src/lib/bitcoin/spv.ts:59](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/spv.ts#L59) +[lib/bitcoin/spv.ts:59](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/spv.ts#L59) ___ @@ -46,4 +46,4 @@ The 0-based index of the transaction's position in the block. #### Defined in -[src/lib/bitcoin/spv.ts:64](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/spv.ts#L64) +[lib/bitcoin/spv.ts:64](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/spv.ts#L64) diff --git a/typescript/api-reference/interfaces/BitcoinTxOutpoint.md b/typescript/api-reference/interfaces/BitcoinTxOutpoint.md index fa9aa37b3..e9d8e5f62 100644 --- a/typescript/api-reference/interfaces/BitcoinTxOutpoint.md +++ b/typescript/api-reference/interfaces/BitcoinTxOutpoint.md @@ -19,7 +19,7 @@ The zero-based index of the output from the specified transaction. #### Defined in -[src/lib/bitcoin/tx.ts:57](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L57) +[lib/bitcoin/tx.ts:57](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L57) ___ @@ -31,4 +31,4 @@ The hash of the transaction the outpoint belongs to. #### Defined in -[src/lib/bitcoin/tx.ts:52](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L52) +[lib/bitcoin/tx.ts:52](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L52) diff --git a/typescript/api-reference/interfaces/BitcoinTxOutput.md b/typescript/api-reference/interfaces/BitcoinTxOutput.md index 6defd54fb..d01c5ab9b 100644 --- a/typescript/api-reference/interfaces/BitcoinTxOutput.md +++ b/typescript/api-reference/interfaces/BitcoinTxOutput.md @@ -20,7 +20,7 @@ The 0-based index of the output. #### Defined in -[src/lib/bitcoin/tx.ts:77](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L77) +[lib/bitcoin/tx.ts:77](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L77) ___ @@ -32,7 +32,7 @@ The receiving scriptPubKey. #### Defined in -[src/lib/bitcoin/tx.ts:87](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L87) +[lib/bitcoin/tx.ts:87](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L87) ___ @@ -44,4 +44,4 @@ The value of the output in satoshis. #### Defined in -[src/lib/bitcoin/tx.ts:82](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/tx.ts#L82) +[lib/bitcoin/tx.ts:82](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/tx.ts#L82) diff --git a/typescript/api-reference/interfaces/Bridge.md b/typescript/api-reference/interfaces/Bridge.md index d97ba6b0e..55ca6b55c 100644 --- a/typescript/api-reference/interfaces/Bridge.md +++ b/typescript/api-reference/interfaces/Bridge.md @@ -21,6 +21,7 @@ Interface for communication with the Bridge on-chain contract. - [deposits](Bridge.md#deposits) - [getChainIdentifier](Bridge.md#getchainidentifier) - [pendingRedemptions](Bridge.md#pendingredemptions) +- [pendingRedemptionsByWalletPKH](Bridge.md#pendingredemptionsbywalletpkh) - [requestRedemption](Bridge.md#requestredemption) - [revealDeposit](Bridge.md#revealdeposit) - [submitDepositSweepProof](Bridge.md#submitdepositsweepproof) @@ -44,7 +45,7 @@ GetEventsFunction #### Defined in -[src/lib/contracts/bridge.ts:26](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L26) +[lib/contracts/bridge.ts:26](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L26) ___ @@ -60,7 +61,7 @@ GetEventsFunction #### Defined in -[src/lib/contracts/bridge.ts:155](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L155) +[lib/contracts/bridge.ts:169](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L169) ___ @@ -76,7 +77,7 @@ GetEventsFunction #### Defined in -[src/lib/contracts/bridge.ts:181](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L181) +[lib/contracts/bridge.ts:195](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L195) ## Methods @@ -96,7 +97,7 @@ Compressed (33 bytes long with 02 or 03 prefix) active wallet's #### Defined in -[src/lib/contracts/bridge.ts:149](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L149) +[lib/contracts/bridge.ts:163](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L163) ___ @@ -120,7 +121,7 @@ The hash of the UTXO. #### Defined in -[src/lib/contracts/bridge.ts:175](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L175) +[lib/contracts/bridge.ts:189](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L189) ___ @@ -145,7 +146,7 @@ Revealed deposit data. #### Defined in -[src/lib/contracts/bridge.ts:68](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L68) +[lib/contracts/bridge.ts:68](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L68) ___ @@ -161,7 +162,7 @@ Gets the chain-specific identifier of this contract. #### Defined in -[src/lib/contracts/bridge.ts:20](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L20) +[lib/contracts/bridge.ts:20](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L20) ___ @@ -186,7 +187,33 @@ Promise with the pending redemption. #### Defined in -[src/lib/contracts/bridge.ts:124](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L124) +[lib/contracts/bridge.ts:124](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L124) + +___ + +### pendingRedemptionsByWalletPKH + +▸ **pendingRedemptionsByWalletPKH**(`walletPublicKeyHash`, `redeemerOutputScript`): `Promise`\<[`RedemptionRequest`](RedemptionRequest.md)\> + +Gets a pending redemption from the on-chain contract using the wallet's +public key hash instead of the plain-text public key. + +#### Parameters + +| Name | Type | Description | +| :------ | :------ | :------ | +| `walletPublicKeyHash` | [`Hex`](../classes/Hex.md) | Bitcoin public key hash of the wallet the request is targeted to. Must be 20 bytes long. | +| `redeemerOutputScript` | [`Hex`](../classes/Hex.md) | The redeemer output script the redeemed funds are supposed to be locked on. Must not be prepended with length. | + +#### Returns + +`Promise`\<[`RedemptionRequest`](RedemptionRequest.md)\> + +Promise with the pending redemption. + +#### Defined in + +[lib/contracts/bridge.ts:138](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L138) ___ @@ -213,7 +240,7 @@ Transaction hash of the request redemption transaction. #### Defined in -[src/lib/contracts/bridge.ts:84](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L84) +[lib/contracts/bridge.ts:84](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L84) ___ @@ -240,7 +267,7 @@ Transaction hash of the reveal deposit transaction. #### Defined in -[src/lib/contracts/bridge.ts:54](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L54) +[lib/contracts/bridge.ts:54](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L54) ___ @@ -267,7 +294,7 @@ Transaction hash of the submit deposit sweep proof transaction. #### Defined in -[src/lib/contracts/bridge.ts:37](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L37) +[lib/contracts/bridge.ts:37](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L37) ___ @@ -294,7 +321,7 @@ Transaction hash of the submit redemption proof transaction. #### Defined in -[src/lib/contracts/bridge.ts:100](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L100) +[lib/contracts/bridge.ts:100](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L100) ___ @@ -319,7 +346,7 @@ Promise with the pending redemption. #### Defined in -[src/lib/contracts/bridge.ts:138](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L138) +[lib/contracts/bridge.ts:152](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L152) ___ @@ -342,7 +369,7 @@ This number signifies how many confirmations a transaction has to #### Defined in -[src/lib/contracts/bridge.ts:113](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L113) +[lib/contracts/bridge.ts:113](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L113) ___ @@ -358,7 +385,7 @@ Returns the attached WalletRegistry instance. #### Defined in -[src/lib/contracts/bridge.ts:160](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L160) +[lib/contracts/bridge.ts:174](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L174) ___ @@ -382,4 +409,4 @@ Promise with the wallet details. #### Defined in -[src/lib/contracts/bridge.ts:168](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L168) +[lib/contracts/bridge.ts:182](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L182) diff --git a/typescript/api-reference/interfaces/ChainEvent.md b/typescript/api-reference/interfaces/ChainEvent.md index 380791ade..a53d58601 100644 --- a/typescript/api-reference/interfaces/ChainEvent.md +++ b/typescript/api-reference/interfaces/ChainEvent.md @@ -20,7 +20,7 @@ Block hash of the event emission. #### Defined in -[src/lib/contracts/chain-event.ts:14](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain-event.ts#L14) +[lib/contracts/chain-event.ts:14](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain-event.ts#L14) ___ @@ -32,7 +32,7 @@ Block number of the event emission. #### Defined in -[src/lib/contracts/chain-event.ts:10](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain-event.ts#L10) +[lib/contracts/chain-event.ts:10](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain-event.ts#L10) ___ @@ -44,4 +44,4 @@ Transaction hash within which the event was emitted. #### Defined in -[src/lib/contracts/chain-event.ts:18](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain-event.ts#L18) +[lib/contracts/chain-event.ts:18](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain-event.ts#L18) diff --git a/typescript/api-reference/interfaces/ChainIdentifier.md b/typescript/api-reference/interfaces/ChainIdentifier.md index fb3275ee6..6c40160e5 100644 --- a/typescript/api-reference/interfaces/ChainIdentifier.md +++ b/typescript/api-reference/interfaces/ChainIdentifier.md @@ -26,7 +26,7 @@ Identifier as an un-prefixed hex string. #### Defined in -[src/lib/contracts/chain-identifier.ts:8](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain-identifier.ts#L8) +[lib/contracts/chain-identifier.ts:8](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain-identifier.ts#L8) ## Methods @@ -48,4 +48,4 @@ Checks if two identifiers are equal. #### Defined in -[src/lib/contracts/chain-identifier.ts:14](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain-identifier.ts#L14) +[lib/contracts/chain-identifier.ts:14](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain-identifier.ts#L14) diff --git a/typescript/api-reference/interfaces/CrossChainContractsLoader.md b/typescript/api-reference/interfaces/CrossChainContractsLoader.md index 4fea39457..351d392d3 100644 --- a/typescript/api-reference/interfaces/CrossChainContractsLoader.md +++ b/typescript/api-reference/interfaces/CrossChainContractsLoader.md @@ -29,13 +29,13 @@ Loads the chain mapping based on underlying L1 chain. #### Defined in -[src/lib/contracts/cross-chain.ts:38](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L38) +[lib/contracts/cross-chain.ts:38](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L38) ___ ### loadL1Contracts -• **loadL1Contracts**: (`l2ChainName`: ``"Base"``) => `Promise`\<[`L1CrossChainContracts`](../README.md#l1crosschaincontracts)\> +• **loadL1Contracts**: (`l2ChainName`: [`L2Chain`](../README.md#l2chain)) => `Promise`\<[`L1CrossChainContracts`](../README.md#l1crosschaincontracts)\> #### Type declaration @@ -47,7 +47,7 @@ Loads L1-specific TBTC cross-chain contracts for the given L2 chain. | Name | Type | Description | | :------ | :------ | :------ | -| `l2ChainName` | ``"Base"`` | Name of the L2 chain for which to load L1 contracts. | +| `l2ChainName` | [`L2Chain`](../README.md#l2chain) | Name of the L2 chain for which to load L1 contracts. | ##### Returns @@ -55,4 +55,4 @@ Loads L1-specific TBTC cross-chain contracts for the given L2 chain. #### Defined in -[src/lib/contracts/cross-chain.ts:43](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L43) +[lib/contracts/cross-chain.ts:43](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L43) diff --git a/typescript/api-reference/interfaces/CrossChainExtraDataEncoder.md b/typescript/api-reference/interfaces/CrossChainExtraDataEncoder.md index 469a518e7..8a236ecd1 100644 --- a/typescript/api-reference/interfaces/CrossChainExtraDataEncoder.md +++ b/typescript/api-reference/interfaces/CrossChainExtraDataEncoder.md @@ -36,7 +36,7 @@ Identifier of the deposit owner. #### Defined in -[src/lib/contracts/cross-chain.ts:165](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L165) +[lib/contracts/cross-chain.ts:165](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L165) ___ @@ -60,4 +60,4 @@ Encoded extra data. #### Defined in -[src/lib/contracts/cross-chain.ts:158](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L158) +[lib/contracts/cross-chain.ts:158](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L158) diff --git a/typescript/api-reference/interfaces/DepositReceipt.md b/typescript/api-reference/interfaces/DepositReceipt.md index d74a7e8b0..90a7ffa0c 100644 --- a/typescript/api-reference/interfaces/DepositReceipt.md +++ b/typescript/api-reference/interfaces/DepositReceipt.md @@ -25,7 +25,7 @@ public key and refund public key. #### Defined in -[src/lib/contracts/bridge.ts:198](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L198) +[lib/contracts/bridge.ts:212](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L212) ___ @@ -37,7 +37,7 @@ Depositor's chain identifier. #### Defined in -[src/lib/contracts/bridge.ts:192](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L192) +[lib/contracts/bridge.ts:206](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L206) ___ @@ -49,7 +49,7 @@ Optional 32-byte extra data. #### Defined in -[src/lib/contracts/bridge.ts:223](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L223) +[lib/contracts/bridge.ts:237](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L237) ___ @@ -61,7 +61,7 @@ A 4-byte little-endian refund locktime. #### Defined in -[src/lib/contracts/bridge.ts:218](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L218) +[lib/contracts/bridge.ts:232](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L232) ___ @@ -76,7 +76,7 @@ You can use `computeHash160` function to get the hash from a public key. #### Defined in -[src/lib/contracts/bridge.ts:213](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L213) +[lib/contracts/bridge.ts:227](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L227) ___ @@ -90,4 +90,4 @@ You can use `computeHash160` function to get the hash from a public key. #### Defined in -[src/lib/contracts/bridge.ts:205](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L205) +[lib/contracts/bridge.ts:219](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L219) diff --git a/typescript/api-reference/interfaces/DepositRequest.md b/typescript/api-reference/interfaces/DepositRequest.md index a204ba5b2..213eeeb10 100644 --- a/typescript/api-reference/interfaces/DepositRequest.md +++ b/typescript/api-reference/interfaces/DepositRequest.md @@ -23,7 +23,7 @@ Deposit amount in satoshis. #### Defined in -[src/lib/contracts/bridge.ts:267](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L267) +[lib/contracts/bridge.ts:281](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L281) ___ @@ -35,7 +35,7 @@ Depositor's chain identifier. #### Defined in -[src/lib/contracts/bridge.ts:262](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L262) +[lib/contracts/bridge.ts:276](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L276) ___ @@ -47,7 +47,7 @@ UNIX timestamp the deposit was revealed at. #### Defined in -[src/lib/contracts/bridge.ts:277](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L277) +[lib/contracts/bridge.ts:291](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L291) ___ @@ -60,7 +60,7 @@ should have zero as value. #### Defined in -[src/lib/contracts/bridge.ts:282](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L282) +[lib/contracts/bridge.ts:296](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L296) ___ @@ -73,7 +73,7 @@ Denominated in satoshi. #### Defined in -[src/lib/contracts/bridge.ts:287](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L287) +[lib/contracts/bridge.ts:301](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L301) ___ @@ -85,4 +85,4 @@ Optional identifier of the vault the deposit should be routed in. #### Defined in -[src/lib/contracts/bridge.ts:272](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L272) +[lib/contracts/bridge.ts:286](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L286) diff --git a/typescript/api-reference/interfaces/DepositorProxy.md b/typescript/api-reference/interfaces/DepositorProxy.md index aa694798b..3967dc902 100644 --- a/typescript/api-reference/interfaces/DepositorProxy.md +++ b/typescript/api-reference/interfaces/DepositorProxy.md @@ -34,7 +34,7 @@ Gets the chain-specific identifier of this contract. #### Defined in -[src/lib/contracts/depositor-proxy.ts:19](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/depositor-proxy.ts#L19) +[lib/contracts/depositor-proxy.ts:19](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/depositor-proxy.ts#L19) ___ @@ -61,4 +61,4 @@ Transaction hash of the reveal deposit transaction. #### Defined in -[src/lib/contracts/depositor-proxy.ts:31](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/depositor-proxy.ts#L31) +[lib/contracts/depositor-proxy.ts:31](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/depositor-proxy.ts#L31) diff --git a/typescript/api-reference/interfaces/ElectrumCredentials.md b/typescript/api-reference/interfaces/ElectrumCredentials.md index 67665685d..77f594099 100644 --- a/typescript/api-reference/interfaces/ElectrumCredentials.md +++ b/typescript/api-reference/interfaces/ElectrumCredentials.md @@ -20,7 +20,7 @@ Host pointing to the Electrum server. #### Defined in -[src/lib/electrum/client.ts:35](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L35) +[lib/electrum/client.ts:35](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L35) ___ @@ -32,7 +32,7 @@ Port the Electrum server listens on. #### Defined in -[src/lib/electrum/client.ts:39](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L39) +[lib/electrum/client.ts:39](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L39) ___ @@ -44,4 +44,4 @@ Protocol used by the Electrum server. #### Defined in -[src/lib/electrum/client.ts:43](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/electrum/client.ts#L43) +[lib/electrum/client.ts:43](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/electrum/client.ts#L43) diff --git a/typescript/api-reference/interfaces/EthereumContractConfig.md b/typescript/api-reference/interfaces/EthereumContractConfig.md index abed960bc..78a822c0f 100644 --- a/typescript/api-reference/interfaces/EthereumContractConfig.md +++ b/typescript/api-reference/interfaces/EthereumContractConfig.md @@ -22,7 +22,7 @@ contract artifact. #### Defined in -[src/lib/ethereum/adapter.ts:53](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L53) +[lib/ethereum/adapter.ts:53](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L53) ___ @@ -36,7 +36,7 @@ contract artifact. #### Defined in -[src/lib/ethereum/adapter.ts:64](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L64) +[lib/ethereum/adapter.ts:64](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L64) ___ @@ -49,4 +49,4 @@ Provider - will return a downgraded Contract which only has read-only access (i. #### Defined in -[src/lib/ethereum/adapter.ts:58](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/adapter.ts#L58) +[lib/ethereum/adapter.ts:58](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/adapter.ts#L58) diff --git a/typescript/api-reference/interfaces/GetChainEvents.Function.md b/typescript/api-reference/interfaces/GetChainEvents.Function.md index 80a5ee695..e3408625b 100644 --- a/typescript/api-reference/interfaces/GetChainEvents.Function.md +++ b/typescript/api-reference/interfaces/GetChainEvents.Function.md @@ -33,4 +33,4 @@ Array of found events. #### Defined in -[src/lib/contracts/chain-event.ts:60](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain-event.ts#L60) +[lib/contracts/chain-event.ts:60](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain-event.ts#L60) diff --git a/typescript/api-reference/interfaces/GetChainEvents.Options.md b/typescript/api-reference/interfaces/GetChainEvents.Options.md index c2cde770a..a8f63faa7 100644 --- a/typescript/api-reference/interfaces/GetChainEvents.Options.md +++ b/typescript/api-reference/interfaces/GetChainEvents.Options.md @@ -24,7 +24,7 @@ Number of blocks for interval length in partial events pulls. #### Defined in -[src/lib/contracts/chain-event.ts:43](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain-event.ts#L43) +[lib/contracts/chain-event.ts:43](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain-event.ts#L43) ___ @@ -37,7 +37,7 @@ If not defined a block number of a contract deployment is used. #### Defined in -[src/lib/contracts/chain-event.ts:30](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain-event.ts#L30) +[lib/contracts/chain-event.ts:30](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain-event.ts#L30) ___ @@ -49,7 +49,7 @@ A logger function to pass execution messages. #### Defined in -[src/lib/contracts/chain-event.ts:47](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain-event.ts#L47) +[lib/contracts/chain-event.ts:47](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain-event.ts#L47) ___ @@ -61,7 +61,7 @@ Number of retries in case of an error getting the events. #### Defined in -[src/lib/contracts/chain-event.ts:39](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain-event.ts#L39) +[lib/contracts/chain-event.ts:39](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain-event.ts#L39) ___ @@ -74,4 +74,4 @@ If not defined the latest block number will be used. #### Defined in -[src/lib/contracts/chain-event.ts:35](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/chain-event.ts#L35) +[lib/contracts/chain-event.ts:35](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/chain-event.ts#L35) diff --git a/typescript/api-reference/interfaces/L1BitcoinDepositor.md b/typescript/api-reference/interfaces/L1BitcoinDepositor.md index 3f0f01b86..29224d2ac 100644 --- a/typescript/api-reference/interfaces/L1BitcoinDepositor.md +++ b/typescript/api-reference/interfaces/L1BitcoinDepositor.md @@ -30,7 +30,7 @@ encode and decode the extra data included in the cross-chain deposit script. #### Defined in -[src/lib/contracts/cross-chain.ts:126](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L126) +[lib/contracts/cross-chain.ts:126](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L126) ___ @@ -46,7 +46,7 @@ Gets the chain-specific identifier of this contract. #### Defined in -[src/lib/contracts/cross-chain.ts:120](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L120) +[lib/contracts/cross-chain.ts:120](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L120) ___ @@ -73,4 +73,4 @@ Transaction hash of the reveal deposit transaction. #### Defined in -[src/lib/contracts/cross-chain.ts:138](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L138) +[lib/contracts/cross-chain.ts:138](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L138) diff --git a/typescript/api-reference/interfaces/L2BitcoinDepositor.md b/typescript/api-reference/interfaces/L2BitcoinDepositor.md index 412f090d3..35c9e1d71 100644 --- a/typescript/api-reference/interfaces/L2BitcoinDepositor.md +++ b/typescript/api-reference/interfaces/L2BitcoinDepositor.md @@ -5,6 +5,7 @@ deployed on the given L2 chain. ## Implemented by +- [`ArbitrumL2BitcoinDepositor`](../classes/ArbitrumL2BitcoinDepositor.md) - [`BaseL2BitcoinDepositor`](../classes/BaseL2BitcoinDepositor.md) ## Table of contents @@ -32,7 +33,7 @@ encode and decode the extra data included in the cross-chain deposit script. #### Defined in -[src/lib/contracts/cross-chain.ts:92](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L92) +[lib/contracts/cross-chain.ts:92](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L92) ___ @@ -48,7 +49,7 @@ Gets the chain-specific identifier of this contract. #### Defined in -[src/lib/contracts/cross-chain.ts:72](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L72) +[lib/contracts/cross-chain.ts:72](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L72) ___ @@ -67,7 +68,7 @@ The identifier of the deposit owner or undefined if not set. #### Defined in -[src/lib/contracts/cross-chain.ts:79](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L79) +[lib/contracts/cross-chain.ts:79](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L79) ___ @@ -94,7 +95,7 @@ Transaction hash of the reveal deposit transaction. #### Defined in -[src/lib/contracts/cross-chain.ts:104](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L104) +[lib/contracts/cross-chain.ts:104](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L104) ___ @@ -117,4 +118,4 @@ issued by this contract. #### Defined in -[src/lib/contracts/cross-chain.ts:86](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L86) +[lib/contracts/cross-chain.ts:86](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L86) diff --git a/typescript/api-reference/interfaces/L2TBTCToken.md b/typescript/api-reference/interfaces/L2TBTCToken.md index 29db500d8..72a6681f6 100644 --- a/typescript/api-reference/interfaces/L2TBTCToken.md +++ b/typescript/api-reference/interfaces/L2TBTCToken.md @@ -5,6 +5,7 @@ canonical L2 tBTC token. ## Implemented by +- [`ArbitrumL2TBTCToken`](../classes/ArbitrumL2TBTCToken.md) - [`BaseL2TBTCToken`](../classes/BaseL2TBTCToken.md) ## Table of contents @@ -36,7 +37,7 @@ The balance of the given identifier in 1e18 precision. #### Defined in -[src/lib/contracts/cross-chain.ts:61](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L61) +[lib/contracts/cross-chain.ts:61](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L61) ___ @@ -52,4 +53,4 @@ Gets the chain-specific identifier of this contract. #### Defined in -[src/lib/contracts/cross-chain.ts:54](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/cross-chain.ts#L54) +[lib/contracts/cross-chain.ts:54](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/cross-chain.ts#L54) diff --git a/typescript/api-reference/interfaces/RedeemerProxy.md b/typescript/api-reference/interfaces/RedeemerProxy.md index b28b86fac..2bd32fb6e 100644 --- a/typescript/api-reference/interfaces/RedeemerProxy.md +++ b/typescript/api-reference/interfaces/RedeemerProxy.md @@ -25,7 +25,7 @@ claim the tBTC tokens if anything goes wrong during the redemption process. #### Defined in -[src/services/redemptions/redeemer-proxy.ts:13](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redeemer-proxy.ts#L13) +[services/redemptions/redeemer-proxy.ts:13](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/redemptions/redeemer-proxy.ts#L13) ___ @@ -50,4 +50,4 @@ Target chain hash of the request redemption transaction #### Defined in -[src/services/redemptions/redeemer-proxy.ts:21](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/services/redemptions/redeemer-proxy.ts#L21) +[services/redemptions/redeemer-proxy.ts:21](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/services/redemptions/redeemer-proxy.ts#L21) diff --git a/typescript/api-reference/interfaces/RedemptionRequest.md b/typescript/api-reference/interfaces/RedemptionRequest.md index b1ce2635e..bce16ad3f 100644 --- a/typescript/api-reference/interfaces/RedemptionRequest.md +++ b/typescript/api-reference/interfaces/RedemptionRequest.md @@ -23,7 +23,7 @@ On-chain identifier of the redeemer. #### Defined in -[src/lib/contracts/bridge.ts:306](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L306) +[lib/contracts/bridge.ts:320](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L320) ___ @@ -36,7 +36,7 @@ prepended with length. #### Defined in -[src/lib/contracts/bridge.ts:312](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L312) +[lib/contracts/bridge.ts:326](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L326) ___ @@ -50,7 +50,7 @@ by the sum of the fee share and the treasury fee for this particular output. #### Defined in -[src/lib/contracts/bridge.ts:319](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L319) +[lib/contracts/bridge.ts:333](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L333) ___ @@ -62,7 +62,7 @@ UNIX timestamp the request was created at. #### Defined in -[src/lib/contracts/bridge.ts:338](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L338) +[lib/contracts/bridge.ts:352](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L352) ___ @@ -77,7 +77,7 @@ on-chain contract at the time the redemption request was made. #### Defined in -[src/lib/contracts/bridge.ts:327](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L327) +[lib/contracts/bridge.ts:341](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L341) ___ @@ -90,4 +90,4 @@ redemption's `requestedAmount` to pay the transaction network fee. #### Defined in -[src/lib/contracts/bridge.ts:333](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L333) +[lib/contracts/bridge.ts:347](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L347) diff --git a/typescript/api-reference/interfaces/TBTCToken.md b/typescript/api-reference/interfaces/TBTCToken.md index 49218c879..e29c2698f 100644 --- a/typescript/api-reference/interfaces/TBTCToken.md +++ b/typescript/api-reference/interfaces/TBTCToken.md @@ -40,7 +40,7 @@ through custom integration with the tBTC Bridge contract. #### Defined in -[src/lib/contracts/tbtc-token.ts:61](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-token.ts#L61) +[lib/contracts/tbtc-token.ts:61](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-token.ts#L61) ___ @@ -56,7 +56,7 @@ Gets the chain-specific identifier of this contract. #### Defined in -[src/lib/contracts/tbtc-token.ts:13](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-token.ts#L13) +[lib/contracts/tbtc-token.ts:13](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-token.ts#L13) ___ @@ -86,7 +86,7 @@ Transaction hash of the approve and call transaction. #### Defined in -[src/lib/contracts/tbtc-token.ts:40](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-token.ts#L40) +[lib/contracts/tbtc-token.ts:40](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-token.ts#L40) ___ @@ -110,4 +110,4 @@ with 1e8 precision in satoshi. #### Defined in -[src/lib/contracts/tbtc-token.ts:23](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-token.ts#L23) +[lib/contracts/tbtc-token.ts:23](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-token.ts#L23) diff --git a/typescript/api-reference/interfaces/TBTCVault.md b/typescript/api-reference/interfaces/TBTCVault.md index cd8177284..2241ffe3b 100644 --- a/typescript/api-reference/interfaces/TBTCVault.md +++ b/typescript/api-reference/interfaces/TBTCVault.md @@ -40,7 +40,7 @@ GetEventsFunction #### Defined in -[src/lib/contracts/tbtc-vault.ts:107](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L107) +[lib/contracts/tbtc-vault.ts:107](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L107) ___ @@ -56,7 +56,7 @@ GetEventsFunction #### Defined in -[src/lib/contracts/tbtc-vault.ts:113](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L113) +[lib/contracts/tbtc-vault.ts:113](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L113) ___ @@ -72,7 +72,7 @@ GetEventsFunction #### Defined in -[src/lib/contracts/tbtc-vault.ts:101](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L101) +[lib/contracts/tbtc-vault.ts:101](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L101) ## Methods @@ -97,7 +97,7 @@ Transaction hash of the optimistic mint cancel transaction. #### Defined in -[src/lib/contracts/tbtc-vault.ts:67](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L67) +[lib/contracts/tbtc-vault.ts:67](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L67) ___ @@ -122,7 +122,7 @@ Transaction hash of the optimistic mint finalize transaction. #### Defined in -[src/lib/contracts/tbtc-vault.ts:80](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L80) +[lib/contracts/tbtc-vault.ts:80](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L80) ___ @@ -138,7 +138,7 @@ Gets the chain-specific identifier of this contract. #### Defined in -[src/lib/contracts/tbtc-vault.ts:14](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L14) +[lib/contracts/tbtc-vault.ts:14](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L14) ___ @@ -156,7 +156,7 @@ Array containing identifiers of all currently registered minters. #### Defined in -[src/lib/contracts/tbtc-vault.ts:30](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L30) +[lib/contracts/tbtc-vault.ts:30](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L30) ___ @@ -178,7 +178,7 @@ Checks if given identifier is registered as guardian. #### Defined in -[src/lib/contracts/tbtc-vault.ts:44](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L44) +[lib/contracts/tbtc-vault.ts:44](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L44) ___ @@ -200,7 +200,7 @@ Checks if given identifier is registered as minter. #### Defined in -[src/lib/contracts/tbtc-vault.ts:37](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L37) +[lib/contracts/tbtc-vault.ts:37](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L37) ___ @@ -221,7 +221,7 @@ Optimistic Minting Delay in seconds. #### Defined in -[src/lib/contracts/tbtc-vault.ts:23](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L23) +[lib/contracts/tbtc-vault.ts:23](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L23) ___ @@ -246,7 +246,7 @@ Optimistic minting request. #### Defined in -[src/lib/contracts/tbtc-vault.ts:92](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L92) +[lib/contracts/tbtc-vault.ts:92](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L92) ___ @@ -271,4 +271,4 @@ Transaction hash of the optimistic mint request transaction. #### Defined in -[src/lib/contracts/tbtc-vault.ts:54](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L54) +[lib/contracts/tbtc-vault.ts:54](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/tbtc-vault.ts#L54) diff --git a/typescript/api-reference/interfaces/Wallet.md b/typescript/api-reference/interfaces/Wallet.md index 5da8afb11..598d8cacd 100644 --- a/typescript/api-reference/interfaces/Wallet.md +++ b/typescript/api-reference/interfaces/Wallet.md @@ -27,7 +27,7 @@ UNIX timestamp indicating the moment the wallet's closing period started. #### Defined in -[src/lib/contracts/bridge.ts:439](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L439) +[lib/contracts/bridge.ts:453](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L453) ___ @@ -39,7 +39,7 @@ UNIX timestamp the wallet was created at. #### Defined in -[src/lib/contracts/bridge.ts:430](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L430) +[lib/contracts/bridge.ts:444](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L444) ___ @@ -51,7 +51,7 @@ Identifier of a ECDSA Wallet registered in the ECDSA Wallet Registry. #### Defined in -[src/lib/contracts/bridge.ts:412](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L412) +[lib/contracts/bridge.ts:426](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L426) ___ @@ -63,7 +63,7 @@ Latest wallet's main UTXO hash. #### Defined in -[src/lib/contracts/bridge.ts:422](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L422) +[lib/contracts/bridge.ts:436](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L436) ___ @@ -76,7 +76,7 @@ funds. #### Defined in -[src/lib/contracts/bridge.ts:435](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L435) +[lib/contracts/bridge.ts:449](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L449) ___ @@ -88,7 +88,7 @@ Moving funds target wallet commitment submitted by the wallet. #### Defined in -[src/lib/contracts/bridge.ts:451](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L451) +[lib/contracts/bridge.ts:465](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L465) ___ @@ -100,7 +100,7 @@ Total count of pending moved funds sweep requests targeting this wallet. #### Defined in -[src/lib/contracts/bridge.ts:443](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L443) +[lib/contracts/bridge.ts:457](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L457) ___ @@ -112,7 +112,7 @@ The total redeemable value of pending redemption requests targeting that wallet. #### Defined in -[src/lib/contracts/bridge.ts:426](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L426) +[lib/contracts/bridge.ts:440](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L440) ___ @@ -124,7 +124,7 @@ Current state of the wallet. #### Defined in -[src/lib/contracts/bridge.ts:447](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L447) +[lib/contracts/bridge.ts:461](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L461) ___ @@ -138,4 +138,4 @@ WalletRegistry. #### Defined in -[src/lib/contracts/bridge.ts:418](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L418) +[lib/contracts/bridge.ts:432](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L432) diff --git a/typescript/api-reference/interfaces/WalletRegistry.md b/typescript/api-reference/interfaces/WalletRegistry.md index b56bbdfde..332c57a6b 100644 --- a/typescript/api-reference/interfaces/WalletRegistry.md +++ b/typescript/api-reference/interfaces/WalletRegistry.md @@ -33,7 +33,7 @@ GetEventsFunction #### Defined in -[src/lib/contracts/wallet-registry.ts:32](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L32) +[lib/contracts/wallet-registry.ts:32](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L32) ___ @@ -49,7 +49,7 @@ GetEventsFunction #### Defined in -[src/lib/contracts/wallet-registry.ts:38](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L38) +[lib/contracts/wallet-registry.ts:38](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L38) ___ @@ -65,7 +65,7 @@ GetEventsFunction #### Defined in -[src/lib/contracts/wallet-registry.ts:26](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L26) +[lib/contracts/wallet-registry.ts:26](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L26) ## Methods @@ -81,7 +81,7 @@ Gets the chain-specific identifier of this contract. #### Defined in -[src/lib/contracts/wallet-registry.ts:13](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L13) +[lib/contracts/wallet-registry.ts:13](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L13) ___ @@ -105,4 +105,4 @@ Uncompressed public key without the 04 prefix. #### Defined in -[src/lib/contracts/wallet-registry.ts:20](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L20) +[lib/contracts/wallet-registry.ts:20](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/wallet-registry.ts#L20) diff --git a/typescript/api-reference/modules/BitcoinNetwork.md b/typescript/api-reference/modules/BitcoinNetwork.md index 31437a832..ff9bab99b 100644 --- a/typescript/api-reference/modules/BitcoinNetwork.md +++ b/typescript/api-reference/modules/BitcoinNetwork.md @@ -30,4 +30,4 @@ Bitcoin Network. #### Defined in -[src/lib/bitcoin/network.ts:33](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/bitcoin/network.ts#L33) +[lib/bitcoin/network.ts:33](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/bitcoin/network.ts#L33) diff --git a/typescript/api-reference/modules/Chains.md b/typescript/api-reference/modules/Chains.md index c9e37e04b..75cf9411d 100644 --- a/typescript/api-reference/modules/Chains.md +++ b/typescript/api-reference/modules/Chains.md @@ -6,5 +6,6 @@ Chains supported by tBTC v2 contracts. ### Enumerations +- [Arbitrum](../enums/Chains.Arbitrum.md) - [Base](../enums/Chains.Base.md) - [Ethereum](../enums/Chains.Ethereum.md) diff --git a/typescript/api-reference/modules/WalletState.md b/typescript/api-reference/modules/WalletState.md index 79879efef..fd8b5d284 100644 --- a/typescript/api-reference/modules/WalletState.md +++ b/typescript/api-reference/modules/WalletState.md @@ -24,4 +24,4 @@ #### Defined in -[src/lib/contracts/bridge.ts:394](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L394) +[lib/contracts/bridge.ts:408](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L408) diff --git a/typescript/package.json b/typescript/package.json index ee40c8ba7..53233d1e1 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -28,7 +28,6 @@ "@bitcoinerlab/secp256k1": "^1.0.5", "@keep-network/ecdsa": "development", "@keep-network/tbtc-v2": "development", - "@ledgerhq/wallet-api-client": "^1.2.1", "bignumber.js": "^9.1.2", "bitcoinjs-lib": "^6.1.5", "bufio": "^1.0.6", diff --git a/typescript/src/index.ts b/typescript/src/index.ts index e922cbdb8..17f8530f7 100644 --- a/typescript/src/index.ts +++ b/typescript/src/index.ts @@ -1,5 +1,6 @@ // Export shared library modules. export * from "./lib/base" +export * from "./lib/arbitrum" export * from "./lib/bitcoin" export * from "./lib/contracts" export * from "./lib/electrum" diff --git a/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumL2BitcoinDepositor.json b/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumL2BitcoinDepositor.json new file mode 100644 index 000000000..0af34abd3 --- /dev/null +++ b/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumL2BitcoinDepositor.json @@ -0,0 +1,429 @@ +{ + "address": "0xf90292a39014033DE50c81f651365cB6A1040Bb6", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "bytes4", + "name": "version", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "inputVector", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "outputVector", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "locktime", + "type": "bytes4" + } + ], + "indexed": false, + "internalType": "struct IBridgeTypes.BitcoinTxInfo", + "name": "fundingTx", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + }, + { + "internalType": "bytes8", + "name": "blindingFactor", + "type": "bytes8" + }, + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes20", + "name": "refundPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes4", + "name": "refundLocktime", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + } + ], + "indexed": false, + "internalType": "struct IBridgeTypes.DepositRevealInfo", + "name": "reveal", + "type": "tuple" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2Sender", + "type": "address" + } + ], + "name": "DepositInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l1BitcoinDepositor", + "type": "address" + } + ], + "name": "attachL1BitcoinDepositor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_wormholeRelayer", + "type": "address" + }, + { + "internalType": "address", + "name": "_l2WormholeGateway", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_l1ChainId", + "type": "uint16" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes4", + "name": "version", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "inputVector", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "outputVector", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "locktime", + "type": "bytes4" + } + ], + "internalType": "struct IBridgeTypes.BitcoinTxInfo", + "name": "fundingTx", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + }, + { + "internalType": "bytes8", + "name": "blindingFactor", + "type": "bytes8" + }, + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes20", + "name": "refundPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes4", + "name": "refundLocktime", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + } + ], + "internalType": "struct IBridgeTypes.DepositRevealInfo", + "name": "reveal", + "type": "tuple" + }, + { + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + } + ], + "name": "initializeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "l1BitcoinDepositor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l1ChainId", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2WormholeGateway", + "outputs": [ + { + "internalType": "contract IL2WormholeGateway", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "additionalVaas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "sourceAddress", + "type": "bytes32" + }, + { + "internalType": "uint16", + "name": "sourceChain", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "receiveWormholeMessages", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "wormholeRelayer", + "outputs": [ + { + "internalType": "contract IWormholeRelayer", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xaeb9ee6679e0f96108788abffa9ed78c943c09565686dfdb826378e9bd1487df", + "receipt": { + "to": null, + "from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", + "contractAddress": "0x04BE8F183572ec802aD26756F3E9398098700E76", + "transactionIndex": 2, + "gasUsed": "704802", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000202000001000000000000000000000000000000000000020000000000000000000800000000800000000000000000000000400002000200000000000000000000000000000000000080000000000000800080000000000000000000000000000400000000000100000000000000000000000000000020000000000000000020040000000008000400000000000000000020000000000000000000080000000000000000000000000000000000000000400000", + "blockHash": "0xcb1f5aa73f2f63d359224b51e7abf66a431e3420daa6940b72a3a58dd5a00c85", + "transactionHash": "0xaeb9ee6679e0f96108788abffa9ed78c943c09565686dfdb826378e9bd1487df", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 7063584, + "transactionHash": "0xaeb9ee6679e0f96108788abffa9ed78c943c09565686dfdb826378e9bd1487df", + "address": "0x04BE8F183572ec802aD26756F3E9398098700E76", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000001ecd87c8d510a7390a561ae0ac54fbe7e5125bcf" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xcb1f5aa73f2f63d359224b51e7abf66a431e3420daa6940b72a3a58dd5a00c85" + }, + { + "transactionIndex": 2, + "blockNumber": 7063584, + "transactionHash": "0xaeb9ee6679e0f96108788abffa9ed78c943c09565686dfdb826378e9bd1487df", + "address": "0x04BE8F183572ec802aD26756F3E9398098700E76", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0xcb1f5aa73f2f63d359224b51e7abf66a431e3420daa6940b72a3a58dd5a00c85" + }, + { + "transactionIndex": 2, + "blockNumber": 7063584, + "transactionHash": "0xaeb9ee6679e0f96108788abffa9ed78c943c09565686dfdb826378e9bd1487df", + "address": "0x04BE8F183572ec802aD26756F3E9398098700E76", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 3, + "blockHash": "0xcb1f5aa73f2f63d359224b51e7abf66a431e3420daa6940b72a3a58dd5a00c85" + }, + { + "transactionIndex": 2, + "blockNumber": 7063584, + "transactionHash": "0xaeb9ee6679e0f96108788abffa9ed78c943c09565686dfdb826378e9bd1487df", + "address": "0x04BE8F183572ec802aD26756F3E9398098700E76", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b2f6c5b73239c39360ee0ea95047565dab13e3c7", + "logIndex": 4, + "blockHash": "0xcb1f5aa73f2f63d359224b51e7abf66a431e3420daa6940b72a3a58dd5a00c85" + } + ], + "blockNumber": 7063584, + "cumulativeGasUsed": "804788", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x1Ecd87C8D510A7390a561AE0Ac54FBe7e5125BcF", + "devdoc": "Contract deployed as upgradable proxy" +} diff --git a/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumTBTC.json b/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumTBTC.json new file mode 100644 index 000000000..0a1f11eb0 --- /dev/null +++ b/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumTBTC.json @@ -0,0 +1,863 @@ +{ + "address": "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "MinterAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "MinterRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "addGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "addMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getGuardians", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinters", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "guardians", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isGuardian", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isMinter", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "minters", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "recoverERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "recoverERC721", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "removeMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x34004f22f4d206717368f941ddb7d389898240d86568f5bc71131136fd123f4a", + "receipt": { + "to": null, + "from": "0x123694886DBf5Ac94DDA07135349534536D14cAf", + "contractAddress": "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40", + "transactionIndex": 2, + "gasUsed": "5686119", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000000002000000000000000000000000000400000000400000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000004800000000000000000000000400000000000000000000000000000000000000000000080000000000000800000000000000000000000000000000400000000000000000000000000000000040000000020000000002000000000440000200000000400000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xebc0b7d3355b4b1d649eb1ab3090eec9eda43549077680000981eda52a0cb2a6", + "transactionHash": "0x34004f22f4d206717368f941ddb7d389898240d86568f5bc71131136fd123f4a", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 75576786, + "transactionHash": "0x34004f22f4d206717368f941ddb7d389898240d86568f5bc71131136fd123f4a", + "address": "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000da534b567099ca481384133bc121d5843f681365" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xebc0b7d3355b4b1d649eb1ab3090eec9eda43549077680000981eda52a0cb2a6" + }, + { + "transactionIndex": 2, + "blockNumber": 75576786, + "transactionHash": "0x34004f22f4d206717368f941ddb7d389898240d86568f5bc71131136fd123f4a", + "address": "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000123694886dbf5ac94dda07135349534536d14caf" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xebc0b7d3355b4b1d649eb1ab3090eec9eda43549077680000981eda52a0cb2a6" + }, + { + "transactionIndex": 2, + "blockNumber": 75576786, + "transactionHash": "0x34004f22f4d206717368f941ddb7d389898240d86568f5bc71131136fd123f4a", + "address": "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 2, + "blockHash": "0xebc0b7d3355b4b1d649eb1ab3090eec9eda43549077680000981eda52a0cb2a6" + }, + { + "transactionIndex": 2, + "blockNumber": 75576786, + "transactionHash": "0x34004f22f4d206717368f941ddb7d389898240d86568f5bc71131136fd123f4a", + "address": "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002612d20cc087670a959bb12ca3c5fd56c8a3db3", + "logIndex": 3, + "blockHash": "0xebc0b7d3355b4b1d649eb1ab3090eec9eda43549077680000981eda52a0cb2a6" + } + ], + "blockNumber": 75576786, + "cumulativeGasUsed": "5944386", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0xDa534b567099Ca481384133bC121D5843F681365", + "devdoc": "Contract deployed as upgradable proxy" +} diff --git a/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json new file mode 100644 index 000000000..21e1cdce4 --- /dev/null +++ b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json @@ -0,0 +1,429 @@ +{ + "address": "0xB2fEC598a9374078Bb639f3d70555fc4389b7a78", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "bytes4", + "name": "version", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "inputVector", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "outputVector", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "locktime", + "type": "bytes4" + } + ], + "indexed": false, + "internalType": "struct IBridgeTypes.BitcoinTxInfo", + "name": "fundingTx", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + }, + { + "internalType": "bytes8", + "name": "blindingFactor", + "type": "bytes8" + }, + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes20", + "name": "refundPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes4", + "name": "refundLocktime", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + } + ], + "indexed": false, + "internalType": "struct IBridgeTypes.DepositRevealInfo", + "name": "reveal", + "type": "tuple" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2Sender", + "type": "address" + } + ], + "name": "DepositInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l1BitcoinDepositor", + "type": "address" + } + ], + "name": "attachL1BitcoinDepositor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_wormholeRelayer", + "type": "address" + }, + { + "internalType": "address", + "name": "_l2WormholeGateway", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_l1ChainId", + "type": "uint16" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes4", + "name": "version", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "inputVector", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "outputVector", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "locktime", + "type": "bytes4" + } + ], + "internalType": "struct IBridgeTypes.BitcoinTxInfo", + "name": "fundingTx", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + }, + { + "internalType": "bytes8", + "name": "blindingFactor", + "type": "bytes8" + }, + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes20", + "name": "refundPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes4", + "name": "refundLocktime", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + } + ], + "internalType": "struct IBridgeTypes.DepositRevealInfo", + "name": "reveal", + "type": "tuple" + }, + { + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + } + ], + "name": "initializeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "l1BitcoinDepositor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l1ChainId", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2WormholeGateway", + "outputs": [ + { + "internalType": "contract IL2WormholeGateway", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes[]", + "name": "additionalVaas", + "type": "bytes[]" + }, + { + "internalType": "bytes32", + "name": "sourceAddress", + "type": "bytes32" + }, + { + "internalType": "uint16", + "name": "sourceChain", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "receiveWormholeMessages", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "wormholeRelayer", + "outputs": [ + { + "internalType": "contract IWormholeRelayer", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x43cb5d1e101836fcb61fa9daefa99319a0273b1fafcf0fe011b57483e02b578d", + "receipt": { + "to": null, + "from": "0x992500f42A48371c2c9f91EE6165ba8F9dfB1692", + "contractAddress": "0xB2fEC598a9374078Bb639f3d70555fc4389b7a78", + "transactionIndex": 1, + "gasUsed": "1819206", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000020000000000000000000000080200000000030000000000000000000000000000000000002000001000000000000000002000000000000000000020000000000000000000800000000800000000000000000000000400000000000000000000000002000000000000000000080000000000000800000000000000000000000000000000400000000000000000000000000000000000000000020000000000000000000040000000000000400000000000000000020000000000800000000400000000000000000000000000000000000000000000000", + "blockHash": "0xe28c099c49fa263d666a02e7be27845647250097dbf1ec335811e1b83c65ca1d", + "transactionHash": "0x43cb5d1e101836fcb61fa9daefa99319a0273b1fafcf0fe011b57483e02b578d", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 62644268, + "transactionHash": "0x43cb5d1e101836fcb61fa9daefa99319a0273b1fafcf0fe011b57483e02b578d", + "address": "0xB2fEC598a9374078Bb639f3d70555fc4389b7a78", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x00000000000000000000000077bf510b1c0aa46e3006724d9803a49c36da4e8f" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xe28c099c49fa263d666a02e7be27845647250097dbf1ec335811e1b83c65ca1d" + }, + { + "transactionIndex": 1, + "blockNumber": 62644268, + "transactionHash": "0x43cb5d1e101836fcb61fa9daefa99319a0273b1fafcf0fe011b57483e02b578d", + "address": "0xB2fEC598a9374078Bb639f3d70555fc4389b7a78", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000992500f42a48371c2c9f91ee6165ba8f9dfb1692" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0xe28c099c49fa263d666a02e7be27845647250097dbf1ec335811e1b83c65ca1d" + }, + { + "transactionIndex": 1, + "blockNumber": 62644268, + "transactionHash": "0x43cb5d1e101836fcb61fa9daefa99319a0273b1fafcf0fe011b57483e02b578d", + "address": "0xB2fEC598a9374078Bb639f3d70555fc4389b7a78", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 2, + "blockHash": "0xe28c099c49fa263d666a02e7be27845647250097dbf1ec335811e1b83c65ca1d" + }, + { + "transactionIndex": 1, + "blockNumber": 62644268, + "transactionHash": "0x43cb5d1e101836fcb61fa9daefa99319a0273b1fafcf0fe011b57483e02b578d", + "address": "0xB2fEC598a9374078Bb639f3d70555fc4389b7a78", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f07fac18ea91bec2a8f766c22c49cc32b078e14", + "logIndex": 3, + "blockHash": "0xe28c099c49fa263d666a02e7be27845647250097dbf1ec335811e1b83c65ca1d" + } + ], + "blockNumber": 62644268, + "cumulativeGasUsed": "1819206", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x77Bf510B1C0aA46e3006724d9803a49c36da4E8f", + "devdoc": "Contract deployed as upgradable proxy" +} diff --git a/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumTBTC.json b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumTBTC.json new file mode 100644 index 000000000..68f1fdea7 --- /dev/null +++ b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumTBTC.json @@ -0,0 +1,863 @@ +{ + "address": "0xb8f31A249bcb45267d06b9E51252c4793B917Cd0", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "MinterAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "MinterRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "addGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "addMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getGuardians", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinters", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "guardians", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isGuardian", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "isMinter", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "minters", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "recoverERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC721Upgradeable", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "recoverERC721", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "minter", + "type": "address" + } + ], + "name": "removeMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x8ecc4738684c4cd58715ed8fd2dcc6a79e9bc64b4235eb15c326a22334a92ffc", + "receipt": { + "to": null, + "from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", + "contractAddress": "0xb8f31A249bcb45267d06b9E51252c4793B917Cd0", + "transactionIndex": 1, + "gasUsed": "3818052", + "logsBloom": "0x00000000000000008000000000000000400000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000202000001000000000000000000000000000000000400020000000000000000000800000000800000000000000001000000400000000200000000000000000002000000000000000080000000000000800000000000000000000000000000000400000000000000000000000000000000000000000020000000000000200020040000000000000400000000000000000020000000000000000000000000000000000000000000000000000000000040000000", + "blockHash": "0x926ae0f0b2e6085539f0424bb2b0eb3ccc7567a3928050968adac5a960e0d002", + "transactionHash": "0x8ecc4738684c4cd58715ed8fd2dcc6a79e9bc64b4235eb15c326a22334a92ffc", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 14176655, + "transactionHash": "0x8ecc4738684c4cd58715ed8fd2dcc6a79e9bc64b4235eb15c326a22334a92ffc", + "address": "0xb8f31A249bcb45267d06b9E51252c4793B917Cd0", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000001e9e56acdb2987dce23eb6e751c22d4f89296a06" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x926ae0f0b2e6085539f0424bb2b0eb3ccc7567a3928050968adac5a960e0d002" + }, + { + "transactionIndex": 1, + "blockNumber": 14176655, + "transactionHash": "0x8ecc4738684c4cd58715ed8fd2dcc6a79e9bc64b4235eb15c326a22334a92ffc", + "address": "0xb8f31A249bcb45267d06b9E51252c4793B917Cd0", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x926ae0f0b2e6085539f0424bb2b0eb3ccc7567a3928050968adac5a960e0d002" + }, + { + "transactionIndex": 1, + "blockNumber": 14176655, + "transactionHash": "0x8ecc4738684c4cd58715ed8fd2dcc6a79e9bc64b4235eb15c326a22334a92ffc", + "address": "0xb8f31A249bcb45267d06b9E51252c4793B917Cd0", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 2, + "blockHash": "0x926ae0f0b2e6085539f0424bb2b0eb3ccc7567a3928050968adac5a960e0d002" + }, + { + "transactionIndex": 1, + "blockNumber": 14176655, + "transactionHash": "0x8ecc4738684c4cd58715ed8fd2dcc6a79e9bc64b4235eb15c326a22334a92ffc", + "address": "0xb8f31A249bcb45267d06b9E51252c4793B917Cd0", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b2f6c5b73239c39360ee0ea95047565dab13e3c7", + "logIndex": 3, + "blockHash": "0x926ae0f0b2e6085539f0424bb2b0eb3ccc7567a3928050968adac5a960e0d002" + } + ], + "blockNumber": 14176655, + "cumulativeGasUsed": "3818052", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x1e9E56Acdb2987DCe23Eb6E751C22d4f89296a06", + "devdoc": "Contract deployed as upgradable proxy" +} diff --git a/typescript/src/lib/arbitrum/index.ts b/typescript/src/lib/arbitrum/index.ts new file mode 100644 index 000000000..4fe471b90 --- /dev/null +++ b/typescript/src/lib/arbitrum/index.ts @@ -0,0 +1,48 @@ +import { + chainIdFromSigner, + ethereumAddressFromSigner, + EthereumSigner, +} from "../ethereum" +import { ArbitrumL2BitcoinDepositor } from "./l2-bitcoin-depositor" +import { ArbitrumL2TBTCToken } from "./l2-tbtc-token" +import { Chains, L2CrossChainContracts } from "../contracts" + +export * from "./l2-bitcoin-depositor" +export * from "./l2-tbtc-token" + +/** + * Loads Arbitrum implementation of tBTC cross-chain contracts for the given Arbitrum + * chain ID and attaches the given signer there. + * @param signer Signer that should be attached to the contracts. + * @param chainId Arbitrum chain ID. + * @returns Handle to the contracts. + * @throws Throws an error if the signer's Arbitrum chain ID is other than + * the one used to load contracts. + */ +export async function loadArbitrumCrossChainContracts( + signer: EthereumSigner, + chainId: Chains.Arbitrum +): Promise { + const signerChainId = await chainIdFromSigner(signer) + if (signerChainId !== chainId) { + throw new Error( + "Signer uses different chain than Arbitrum cross-chain contracts" + ) + } + + const l2BitcoinDepositor = new ArbitrumL2BitcoinDepositor( + { signerOrProvider: signer }, + chainId + ) + l2BitcoinDepositor.setDepositOwner(await ethereumAddressFromSigner(signer)) + + const l2TbtcToken = new ArbitrumL2TBTCToken( + { signerOrProvider: signer }, + chainId + ) + + return { + l2BitcoinDepositor, + l2TbtcToken, + } +} diff --git a/typescript/src/lib/arbitrum/l2-bitcoin-depositor.ts b/typescript/src/lib/arbitrum/l2-bitcoin-depositor.ts new file mode 100644 index 000000000..a43c5834e --- /dev/null +++ b/typescript/src/lib/arbitrum/l2-bitcoin-depositor.ts @@ -0,0 +1,122 @@ +import { + EthersContractConfig, + EthersContractDeployment, + EthersContractHandle, +} from "../ethereum/adapter" +import { L2BitcoinDepositor as L2BitcoinDepositorTypechain } from "../../../typechain/L2BitcoinDepositor" +import { + ChainIdentifier, + Chains, + CrossChainExtraDataEncoder, + DepositReceipt, + L2BitcoinDepositor, +} from "../contracts" +import { + EthereumAddress, + EthereumCrossChainExtraDataEncoder, + packRevealDepositParameters, +} from "../ethereum" +import { Hex } from "../utils" +import { BitcoinRawTxVectors } from "../bitcoin" + +// TODO: Uncomment once Arbitrum native minting is available on Arbitrum mainnet. +// import ArbitrumL2BitcoinDepositorDeployment from "./artifacts/arbitrumOne/ArbitrumL2BitcoinDepositor.json" +import ArbitrumSepoliaL2BitcoinDepositorDeployment from "./artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json" + +/** + * Implementation of the Arbitrum L2BitcoinDepositor handle. + * @see {L2BitcoinDepositor} for reference. + */ +export class ArbitrumL2BitcoinDepositor + extends EthersContractHandle + implements L2BitcoinDepositor +{ + readonly #extraDataEncoder: CrossChainExtraDataEncoder + #depositOwner: ChainIdentifier | undefined + + constructor(config: EthersContractConfig, chainId: Chains.Arbitrum) { + let deployment: EthersContractDeployment + + switch (chainId) { + case Chains.Arbitrum.ArbitrumSepolia: + deployment = ArbitrumSepoliaL2BitcoinDepositorDeployment + break + // TODO: Uncomment once Arbitrum native minting is available on Arbitrum mainnet. + // case Chains.Arbitrum.Arbitrum: + // deployment = ArbitrumL2BitcoinDepositorDeployment + // break + default: + throw new Error("Unsupported deployment type") + } + + super(config, deployment) + + this.#extraDataEncoder = new EthereumCrossChainExtraDataEncoder() + } + + // eslint-disable-next-line valid-jsdoc + /** + * @see {L2BitcoinDepositor#getChainIdentifier} + */ + getChainIdentifier(): ChainIdentifier { + return EthereumAddress.from(this._instance.address) + } + + // eslint-disable-next-line valid-jsdoc + /** + * @see {L2BitcoinDepositor#getDepositOwner} + */ + getDepositOwner(): ChainIdentifier | undefined { + return this.#depositOwner + } + + // eslint-disable-next-line valid-jsdoc + /** + * @see {L2BitcoinDepositor#setDepositOwner} + */ + setDepositOwner(depositOwner: ChainIdentifier | undefined) { + this.#depositOwner = depositOwner + } + + // eslint-disable-next-line valid-jsdoc + /** + * @see {L2BitcoinDepositor#extraDataEncoder} + */ + extraDataEncoder(): CrossChainExtraDataEncoder { + return this.#extraDataEncoder + } + + // eslint-disable-next-line valid-jsdoc + /** + * @see {L2BitcoinDepositor#initializeDeposit} + */ + async initializeDeposit( + depositTx: BitcoinRawTxVectors, + depositOutputIndex: number, + deposit: DepositReceipt, + vault?: ChainIdentifier + ): Promise { + const { fundingTx, reveal } = packRevealDepositParameters( + depositTx, + depositOutputIndex, + deposit, + vault + ) + + if (!deposit.extraData) { + throw new Error("Extra data is required") + } + + const l2DepositOwner = this.extraDataEncoder().decodeDepositOwner( + deposit.extraData + ) + + const tx = await this._instance.initializeDeposit( + fundingTx, + reveal, + `0x${l2DepositOwner.identifierHex}` + ) + + return Hex.from(tx.hash) + } +} diff --git a/typescript/src/lib/arbitrum/l2-tbtc-token.ts b/typescript/src/lib/arbitrum/l2-tbtc-token.ts new file mode 100644 index 000000000..f54f0c0eb --- /dev/null +++ b/typescript/src/lib/arbitrum/l2-tbtc-token.ts @@ -0,0 +1,56 @@ +import { + EthersContractConfig, + EthersContractDeployment, + EthersContractHandle, +} from "../ethereum/adapter" +import { L2TBTC as L2TBTCTypechain } from "../../../typechain/L2TBTC" +import { ChainIdentifier, Chains, L2TBTCToken } from "../contracts" +import { BigNumber } from "ethers" +import { EthereumAddress } from "../ethereum" + +// TODO: Uncomment once Arbitrum native minting is available on Arbitrum mainnet. +// import ArbitrumL2TBTCTokenDeployment from "./artifacts/arbitrumOne/ArbitrumTBTC.json" +import ArbitrumSepoliaL2TBTCTokenDeployment from "./artifacts/arbitrumSepolia/ArbitrumTBTC.json" + +/** + * Implementation of the Arbitrum L2TBTCToken handle. + * @see {L2TBTCToken} for reference. + */ +export class ArbitrumL2TBTCToken + extends EthersContractHandle + implements L2TBTCToken +{ + constructor(config: EthersContractConfig, chainId: Chains.Arbitrum) { + let deployment: EthersContractDeployment + + switch (chainId) { + case Chains.Arbitrum.ArbitrumSepolia: + deployment = ArbitrumSepoliaL2TBTCTokenDeployment + break + // TODO: Uncomment once Arbitrum native minting is available on Arbitrum mainnet. + // case Chains.Arbitrum.Arbitrum: + // deployment = ArbitrumL2TBTCTokenDeployment + // break + default: + throw new Error("Unsupported deployment type") + } + + super(config, deployment) + } + + // eslint-disable-next-line valid-jsdoc + /** + * @see {L2TBTCToken#getChainIdentifier} + */ + getChainIdentifier(): ChainIdentifier { + return EthereumAddress.from(this._instance.address) + } + + // eslint-disable-next-line valid-jsdoc + /** + * @see {L2TBTCToken#balanceOf} + */ + balanceOf(identifier: ChainIdentifier): Promise { + return this._instance.balanceOf(`0x${identifier.identifierHex}`) + } +} diff --git a/typescript/src/lib/contracts/bridge.ts b/typescript/src/lib/contracts/bridge.ts index 08c17b421..aa329830b 100644 --- a/typescript/src/lib/contracts/bridge.ts +++ b/typescript/src/lib/contracts/bridge.ts @@ -126,6 +126,20 @@ export interface Bridge { redeemerOutputScript: Hex ): Promise + /** + * Gets a pending redemption from the on-chain contract using the wallet's + * public key hash instead of the plain-text public key. + * @param walletPublicKeyHash Bitcoin public key hash of the wallet the + * request is targeted to. Must be 20 bytes long. + * @param redeemerOutputScript The redeemer output script the redeemed funds + * are supposed to be locked on. Must not be prepended with length. + * @returns Promise with the pending redemption. + */ + pendingRedemptionsByWalletPKH( + walletPublicKeyHash: Hex, + redeemerOutputScript: Hex + ): Promise + /** * Gets a timed-out redemption from the on-chain contract. * @param walletPublicKey Bitcoin public key of the wallet the request is diff --git a/typescript/src/lib/contracts/chain.ts b/typescript/src/lib/contracts/chain.ts index 1393e3acd..c02f7e822 100644 --- a/typescript/src/lib/contracts/chain.ts +++ b/typescript/src/lib/contracts/chain.ts @@ -13,6 +13,11 @@ export namespace Chains { Base = "8453", BaseSepolia = "84532", } + + export enum Arbitrum { + Arbitrum = "42161", + ArbitrumSepolia = "421614", + } } /** @@ -32,6 +37,11 @@ export type ChainMapping = { * Identifier of the Base L2 chain. */ base?: Chains.Base + + /** + * Identifier of the Arbitrum L2 chain. + */ + arbitrum?: Chains.Arbitrum } /** @@ -41,9 +51,11 @@ export const ChainMappings: ChainMapping[] = [ { ethereum: Chains.Ethereum.Mainnet, base: Chains.Base.Base, + arbitrum: Chains.Arbitrum.Arbitrum, }, { ethereum: Chains.Ethereum.Sepolia, base: Chains.Base.BaseSepolia, + arbitrum: Chains.Arbitrum.ArbitrumSepolia, }, ] diff --git a/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json b/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json new file mode 100644 index 000000000..3d4267f71 --- /dev/null +++ b/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json @@ -0,0 +1,737 @@ +{ + "address": "0xD9B523fb879C63b00ef14e48C98f4e3398d3BA2D", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "depositKey", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l1Sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "initialAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tbtcAmount", + "type": "uint256" + } + ], + "name": "DepositFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "depositKey", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l1Sender", + "type": "address" + } + ], + "name": "DepositInitialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "initializeDepositGasOffset", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "finalizeDepositGasOffset", + "type": "uint256" + } + ], + "name": "GasOffsetParametersUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "l2FinalizeDepositGasLimit", + "type": "uint256" + } + ], + "name": "L2FinalizeDepositGasLimitUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "authorization", + "type": "bool" + } + ], + "name": "ReimbursementAuthorizationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newReimbursementPool", + "type": "address" + } + ], + "name": "ReimbursementPoolUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "SATOSHI_MULTIPLIER", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l2BitcoinDepositor", + "type": "address" + } + ], + "name": "attachL2BitcoinDepositor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "bridge", + "outputs": [ + { + "internalType": "contract IBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "deposits", + "outputs": [ + { + "internalType": "enum L1BitcoinDepositor.DepositState", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "depositKey", + "type": "uint256" + } + ], + "name": "finalizeDeposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "finalizeDepositGasOffset", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "gasReimbursements", + "outputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint96", + "name": "gasSpent", + "type": "uint96" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_tbtcBridge", + "type": "address" + }, + { + "internalType": "address", + "name": "_tbtcVault", + "type": "address" + }, + { + "internalType": "address", + "name": "_wormhole", + "type": "address" + }, + { + "internalType": "address", + "name": "_wormholeRelayer", + "type": "address" + }, + { + "internalType": "address", + "name": "_wormholeTokenBridge", + "type": "address" + }, + { + "internalType": "address", + "name": "_l2WormholeGateway", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_l2ChainId", + "type": "uint16" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes4", + "name": "version", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "inputVector", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "outputVector", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "locktime", + "type": "bytes4" + } + ], + "internalType": "struct IBridgeTypes.BitcoinTxInfo", + "name": "fundingTx", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint32", + "name": "fundingOutputIndex", + "type": "uint32" + }, + { + "internalType": "bytes8", + "name": "blindingFactor", + "type": "bytes8" + }, + { + "internalType": "bytes20", + "name": "walletPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes20", + "name": "refundPubKeyHash", + "type": "bytes20" + }, + { + "internalType": "bytes4", + "name": "refundLocktime", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "vault", + "type": "address" + } + ], + "internalType": "struct IBridgeTypes.DepositRevealInfo", + "name": "reveal", + "type": "tuple" + }, + { + "internalType": "address", + "name": "l2DepositOwner", + "type": "address" + } + ], + "name": "initializeDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initializeDepositGasOffset", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2BitcoinDepositor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2ChainId", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2FinalizeDepositGasLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2WormholeGateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "quoteFinalizeDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "cost", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "reimbursementAuthorizations", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "reimbursementPool", + "outputs": [ + { + "internalType": "contract ReimbursementPool", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "tbtcToken", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "tbtcVault", + "outputs": [ + { + "internalType": "contract ITBTCVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_initializeDepositGasOffset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_finalizeDepositGasOffset", + "type": "uint256" + } + ], + "name": "updateGasOffsetParameters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_l2FinalizeDepositGasLimit", + "type": "uint256" + } + ], + "name": "updateL2FinalizeDepositGasLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "bool", + "name": "authorization", + "type": "bool" + } + ], + "name": "updateReimbursementAuthorization", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ReimbursementPool", + "name": "_reimbursementPool", + "type": "address" + } + ], + "name": "updateReimbursementPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "wormhole", + "outputs": [ + { + "internalType": "contract IWormhole", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "wormholeRelayer", + "outputs": [ + { + "internalType": "contract IWormholeRelayer", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "wormholeTokenBridge", + "outputs": [ + { + "internalType": "contract IWormholeTokenBridge", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x2673ee5eb6ce999663c7897ab29bf0e0fda955dccc1f7d374968322d0148ade3", + "receipt": { + "to": null, + "from": "0x992500f42A48371c2c9f91EE6165ba8F9dfB1692", + "contractAddress": "0xD9B523fb879C63b00ef14e48C98f4e3398d3BA2D", + "transactionIndex": 46, + "gasUsed": "866135", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000020000000000000000000000280000000080000000000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000800000000000000000000000400000000000000000000000000000000000000000000080000000000000800004000000000000000000000000000400000000000000000800000000000000000000000020010000000000000000040000000000000400000000000000000020000000000800000000000000000000000000000000000000000000000000000000", + "blockHash": "0x10400e7cfcdc42e3080b7580fcaa58ba8a8023b10d785a58db624c9a7fdc8b2f", + "transactionHash": "0x2673ee5eb6ce999663c7897ab29bf0e0fda955dccc1f7d374968322d0148ade3", + "logs": [ + { + "transactionIndex": 46, + "blockNumber": 6281003, + "transactionHash": "0x2673ee5eb6ce999663c7897ab29bf0e0fda955dccc1f7d374968322d0148ade3", + "address": "0xD9B523fb879C63b00ef14e48C98f4e3398d3BA2D", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000f90292a39014033de50c81f651365cb6a1040bb6" + ], + "data": "0x", + "logIndex": 78, + "blockHash": "0x10400e7cfcdc42e3080b7580fcaa58ba8a8023b10d785a58db624c9a7fdc8b2f" + }, + { + "transactionIndex": 46, + "blockNumber": 6281003, + "transactionHash": "0x2673ee5eb6ce999663c7897ab29bf0e0fda955dccc1f7d374968322d0148ade3", + "address": "0xD9B523fb879C63b00ef14e48C98f4e3398d3BA2D", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000992500f42a48371c2c9f91ee6165ba8f9dfb1692" + ], + "data": "0x", + "logIndex": 79, + "blockHash": "0x10400e7cfcdc42e3080b7580fcaa58ba8a8023b10d785a58db624c9a7fdc8b2f" + }, + { + "transactionIndex": 46, + "blockNumber": 6281003, + "transactionHash": "0x2673ee5eb6ce999663c7897ab29bf0e0fda955dccc1f7d374968322d0148ade3", + "address": "0xD9B523fb879C63b00ef14e48C98f4e3398d3BA2D", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 80, + "blockHash": "0x10400e7cfcdc42e3080b7580fcaa58ba8a8023b10d785a58db624c9a7fdc8b2f" + }, + { + "transactionIndex": 46, + "blockNumber": 6281003, + "transactionHash": "0x2673ee5eb6ce999663c7897ab29bf0e0fda955dccc1f7d374968322d0148ade3", + "address": "0xD9B523fb879C63b00ef14e48C98f4e3398d3BA2D", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000008d58747ef805317270ff7f8e51a8018d3488b17b", + "logIndex": 81, + "blockHash": "0x10400e7cfcdc42e3080b7580fcaa58ba8a8023b10d785a58db624c9a7fdc8b2f" + } + ], + "blockNumber": 6281003, + "cumulativeGasUsed": "11146181", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0xf90292a39014033DE50c81f651365cB6A1040Bb6", + "devdoc": "Contract deployed as upgradable proxy" +} diff --git a/typescript/src/lib/ethereum/bridge.ts b/typescript/src/lib/ethereum/bridge.ts index 1cccb5cf7..c5222f229 100644 --- a/typescript/src/lib/ethereum/bridge.ts +++ b/typescript/src/lib/ethereum/bridge.ts @@ -132,9 +132,24 @@ export class EthereumBridge async pendingRedemptions( walletPublicKey: Hex, redeemerOutputScript: Hex + ): Promise { + const walletPublicKeyHash = BitcoinHashUtils.computeHash160(walletPublicKey) + return this.pendingRedemptionsByWalletPKH( + walletPublicKeyHash, + redeemerOutputScript + ) + } + + // eslint-disable-next-line valid-jsdoc + /** + * @see {Bridge#pendingRedemptionsByWalletPKH} + */ + async pendingRedemptionsByWalletPKH( + walletPublicKeyHash: Hex, + redeemerOutputScript: Hex ): Promise { const redemptionKey = EthereumBridge.buildRedemptionKey( - BitcoinHashUtils.computeHash160(walletPublicKey), + walletPublicKeyHash, redeemerOutputScript ) diff --git a/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts b/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts index 9e49c481f..4d625b99f 100644 --- a/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts +++ b/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts @@ -18,7 +18,10 @@ import { Hex } from "../utils" // TODO: Uncomment once BaseL1BitcoinDepositor is available on Ethereum mainnet. // import MainnetBaseL1BitcoinDepositorDeployment from "./artifacts/mainnet/BaseL1BitcoinDepositor.json" +// import MainnetArbitrumL1BitcoinDepositorDeployment from "./artifacts/mainnet/ArbitrumL1BitcoinDepositor.json" + import SepoliaBaseL1BitcoinDepositorDeployment from "./artifacts/sepolia/BaseL1BitcoinDepositor.json" +import SepoliaArbitrumL1BitcoinDepositorDeployment from "./artifacts/sepolia/ArbitrumL1BitcoinDepositor.json" const artifactLoader = { getMainnet: (l2ChainName: L2Chain) => { @@ -26,6 +29,10 @@ const artifactLoader = { // TODO: Uncomment once BaseL1BitcoinDepositor is available on Ethereum mainnet. // case "Base": // return MainnetBaseL1BitcoinDepositorDeployment + + // TODO: Uncomment once ArbitrumL1BitcoinDepositor is available on Ethereum mainnet. + // case "Arbitrum": + // return MainnetArbitrumL1BitcoinDepositorDeployment default: throw new Error("Unsupported L2 chain") } @@ -35,6 +42,8 @@ const artifactLoader = { switch (l2ChainName) { case "Base": return SepoliaBaseL1BitcoinDepositorDeployment + case "Arbitrum": + return SepoliaArbitrumL1BitcoinDepositorDeployment default: throw new Error("Unsupported L2 chain") } diff --git a/typescript/src/lib/utils/index.ts b/typescript/src/lib/utils/index.ts index b51ccf033..d3e639c60 100644 --- a/typescript/src/lib/utils/index.ts +++ b/typescript/src/lib/utils/index.ts @@ -1,3 +1,2 @@ export * from "./backoff" export * from "./hex" -export * from "./ledger" diff --git a/typescript/src/lib/utils/ledger.ts b/typescript/src/lib/utils/ledger.ts deleted file mode 100644 index cde84b059..000000000 --- a/typescript/src/lib/utils/ledger.ts +++ /dev/null @@ -1,239 +0,0 @@ -import { ethers, Signer } from "ethers" -import { - Account, - EthereumTransaction, - WalletAPIClient, - WindowMessageTransport, -} from "@ledgerhq/wallet-api-client" -import { AddressZero } from "@ethersproject/constants" -import { Deferrable } from "@ethersproject/properties" -import { Hex } from "./hex" -import BigNumber from "bignumber.js" - -class AccountNotFoundError extends Error { - constructor() { - super( - "Account not found. Please use `requestAccount` method or set the signer account with `setAccount` method." - ) - } -} - -/** - * Ethereum signer extended from `ethers` Signer class. The main purpose of it - * is to allow the user to communicate with eth contracts through our tBTC SDK - * inside Ledger Live application, when the app is used there as a Live App. - */ -export class LedgerLiveEthereumSigner extends Signer { - private _walletApiClient: WalletAPIClient - private _windowMessageTransport: WindowMessageTransport - private _account: Account | undefined - - constructor(provider?: ethers.providers.Provider) { - super() - ethers.utils.defineReadOnly(this, "provider", provider) - this._windowMessageTransport = getWindowMessageTransport() - this._walletApiClient = getWalletAPIClient(this._windowMessageTransport) - } - - private _checkAccount(): void { - if (!this._account || !this._account.id) { - throw new AccountNotFoundError() - } - } - - private _checkProviderAndAccount(): void { - this._checkProvider() - this._checkAccount() - } - - private _catchWalletApiError(error?: any, defaultErrorMessage?: string) { - this._windowMessageTransport.disconnect() - - if (typeof error === "string" || error instanceof Error) { - throw new Error(error.toString()) - } - throw new Error( - defaultErrorMessage || - "Something went wrong when using ledger live singer to interact with out wallet." - ) - } - - get account() { - return this._account - } - - setAccount(account: Account | undefined): void { - this._account = account - } - - async requestAccount( - params: { currencyIds?: string[] | undefined } | undefined - ): Promise { - let account: Account - try { - this._windowMessageTransport.connect() - account = await this._walletApiClient.account.request(params) - this._windowMessageTransport.disconnect() - } catch (err) { - this._catchWalletApiError( - err, - "Something went wrong when requesting an account with ledger live signer!" - ) - } - - this._account = account! - return this._account - } - - getAccountId(): string { - this._checkAccount() - return this._account!.id - } - - async getAddress(): Promise { - this._checkAccount() - return this._account!.address - } - - private _getWalletApiEthereumTransaction( - transaction: ethers.providers.TransactionRequest - ): EthereumTransaction { - const { - value, - to, - nonce, - data, - gasPrice, - gasLimit, - maxFeePerGas, - maxPriorityFeePerGas, - } = transaction - - const ethereumTransaction: EthereumTransaction = { - family: "ethereum" as const, - amount: value ? new BigNumber(value.toString()) : new BigNumber(0), - recipient: to ? to : AddressZero, - } - - if (nonce) ethereumTransaction.nonce = Number(nonce) - if (data) - ethereumTransaction.data = Buffer.from( - Hex.from(data.toString()).toString(), - "hex" - ) - if (gasPrice) - ethereumTransaction.gasPrice = new BigNumber(gasPrice.toString()) - if (gasLimit) - ethereumTransaction.gasLimit = new BigNumber(gasLimit.toString()) - if (maxFeePerGas) - ethereumTransaction.maxFeePerGas = new BigNumber(maxFeePerGas.toString()) - if (maxPriorityFeePerGas) - ethereumTransaction.maxPriorityFeePerGas = new BigNumber( - maxPriorityFeePerGas.toString() - ) - - return ethereumTransaction - } - - async signMessage(message: string): Promise { - this._checkAccount() - - let buffer: Buffer - try { - this._windowMessageTransport.connect() - buffer = await this._walletApiClient.message.sign( - this._account!.id, - Buffer.from(message) - ) - this._windowMessageTransport.disconnect() - } catch (err) { - this._catchWalletApiError( - err, - "Something went wrong when signing a message with ledger live signer!" - ) - } - - return buffer!.toString() - } - - async signTransaction( - transaction: ethers.providers.TransactionRequest - ): Promise { - this._checkAccount() - - const ethereumTransaction = - this._getWalletApiEthereumTransaction(transaction) - - let buffer: Buffer - try { - this._windowMessageTransport.connect() - buffer = await this._walletApiClient.transaction.sign( - this._account!.id, - ethereumTransaction - ) - this._windowMessageTransport.disconnect() - } catch (err) { - this._catchWalletApiError( - err, - "Something went wrong when signing a transaction with ledger live signer!" - ) - } - - return buffer!.toString() - } - - async sendTransaction( - transaction: Deferrable - ): Promise { - this._checkProviderAndAccount() - - const pupulatedTransaction = await this.populateTransaction(transaction) - const ethereumTransaction = - this._getWalletApiEthereumTransaction(pupulatedTransaction) - - let transactionHash: string - try { - this._windowMessageTransport.connect() - transactionHash = - await this._walletApiClient.transaction.signAndBroadcast( - this._account!.id, - ethereumTransaction - ) - this._windowMessageTransport.disconnect() - } catch (err) { - this._catchWalletApiError( - err, - "Something went wrong when sending a transaction with ledger live signer!" - ) - } - - const transactionResponse = await this.provider?.getTransaction( - transactionHash! - ) - - if (!transactionResponse) { - throw new Error("Transaction response not found!") - } - - return transactionResponse - } - - connect(provider: ethers.providers.Provider): Signer { - const account = this._account - const newLedgerLiveEthereumSignerInstance = new LedgerLiveEthereumSigner( - provider - ) - newLedgerLiveEthereumSignerInstance.setAccount(account) - return newLedgerLiveEthereumSignerInstance - } -} - -const getWindowMessageTransport = () => { - return new WindowMessageTransport() -} - -const getWalletAPIClient = (windowMessageTransport: WindowMessageTransport) => { - const walletApiClient = new WalletAPIClient(windowMessageTransport) - - return walletApiClient -} diff --git a/typescript/src/services/tbtc.ts b/typescript/src/services/tbtc.ts index 84c759ef4..a2a73aaa7 100644 --- a/typescript/src/services/tbtc.ts +++ b/typescript/src/services/tbtc.ts @@ -19,6 +19,7 @@ import { } from "../lib/ethereum" import { ElectrumClient } from "../lib/electrum" import { loadBaseCrossChainContracts } from "../lib/base" +import { loadArbitrumCrossChainContracts } from "../lib/arbitrum" /** * Entrypoint component of the tBTC v2 SDK. @@ -79,15 +80,20 @@ export class TBTC { * The initialized instance uses default Electrum servers to interact * with Bitcoin mainnet * @param signer Ethereum signer. + * @param crossChainSupport Whether to enable cross-chain support. False by default. * @returns Initialized tBTC v2 SDK entrypoint. * @throws Throws an error if the signer's Ethereum network is other than * Ethereum mainnet. */ - static async initializeMainnet(signer: EthereumSigner): Promise { + static async initializeMainnet( + signer: EthereumSigner, + crossChainSupport: boolean = false + ): Promise { return TBTC.initializeEthereum( signer, Chains.Ethereum.Mainnet, - BitcoinNetwork.Mainnet + BitcoinNetwork.Mainnet, + crossChainSupport ) } @@ -96,15 +102,20 @@ export class TBTC { * The initialized instance uses default Electrum servers to interact * with Bitcoin testnet * @param signer Ethereum signer. + * @param crossChainSupport Whether to enable cross-chain support. False by default. * @returns Initialized tBTC v2 SDK entrypoint. * @throws Throws an error if the signer's Ethereum network is other than * Ethereum mainnet. */ - static async initializeSepolia(signer: EthereumSigner): Promise { + static async initializeSepolia( + signer: EthereumSigner, + crossChainSupport: boolean = false + ): Promise { return TBTC.initializeEthereum( signer, Chains.Ethereum.Sepolia, - BitcoinNetwork.Testnet + BitcoinNetwork.Testnet, + crossChainSupport ) } @@ -225,6 +236,16 @@ export class TBTC { baseChainId ) break + case "Arbitrum": + const arbitrumChainId = chainMapping.arbitrum + if (!arbitrumChainId) { + throw new Error("Arbitrum chain ID not available in chain mapping") + } + l2CrossChainContracts = await loadArbitrumCrossChainContracts( + l2Signer, + arbitrumChainId + ) + break default: throw new Error("Unsupported L2 chain") } diff --git a/typescript/test/lib/arbitrum.test.ts b/typescript/test/lib/arbitrum.test.ts new file mode 100644 index 000000000..be148f642 --- /dev/null +++ b/typescript/test/lib/arbitrum.test.ts @@ -0,0 +1,177 @@ +import { + deployMockContract, + MockContract, +} from "@ethereum-waffle/mock-contract" +import { + ArbitrumL2BitcoinDepositor, + ArbitrumL2TBTCToken, + BitcoinRawTxVectors, + ChainIdentifier, + Chains, + DepositReceipt, + EthereumAddress, + Hex, +} from "../../src" +import { MockProvider } from "@ethereum-waffle/provider" +import { assertContractCalledWith } from "../utils/helpers" +import { expect } from "chai" +import { BigNumber } from "ethers" + +// ABI imports. +import { abi as ArbitrumL2BitcoinDepositorABI } from "../../src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json" +import { abi as ArbitrumL2TBTCTokenABI } from "../../src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumTBTC.json" + +describe("Arbitrum", () => { + describe("ArbitrumL2BitcoinDepositor", () => { + let depositorContract: MockContract + let depositorHandle: ArbitrumL2BitcoinDepositor + + beforeEach(async () => { + const [signer] = new MockProvider().getWallets() + + depositorContract = await deployMockContract( + signer, + `${JSON.stringify(ArbitrumL2BitcoinDepositorABI)}` + ) + + depositorHandle = new ArbitrumL2BitcoinDepositor( + { + address: depositorContract.address, + signerOrProvider: signer, + }, + Chains.Arbitrum.ArbitrumSepolia + ) + }) + + describe("initializeDeposit", () => { + // Just short byte strings for clarity. + const depositTx: BitcoinRawTxVectors = { + version: Hex.from("00000000"), + inputs: Hex.from("11111111"), + outputs: Hex.from("22222222"), + locktime: Hex.from("33333333"), + } + const depositOutputIndex: number = 2 + const deposit: DepositReceipt = { + depositor: EthereumAddress.from( + "934b98637ca318a4d6e7ca6ffd1690b8e77df637" + ), + walletPublicKeyHash: Hex.from( + "8db50eb52063ea9d98b3eac91489a90f738986f6" + ), + refundPublicKeyHash: Hex.from( + "28e081f285138ccbe389c1eb8985716230129f89" + ), + blindingFactor: Hex.from("f9f0c90d00039523"), + refundLocktime: Hex.from("60bcea61"), + extraData: Hex.from( + "00000000000000000000000091fe5b7027c0cA767270bB1A474bA1338BA2A4d2" + ), + } + const vault: ChainIdentifier = EthereumAddress.from( + "82883a4c7a8dd73ef165deb402d432613615ced4" + ) + + context( + "when L2 deposit owner is properly encoded in the extra data", + () => { + beforeEach(async () => { + await depositorContract.mock.initializeDeposit.returns() + + await depositorHandle.initializeDeposit( + depositTx, + depositOutputIndex, + deposit, + vault + ) + }) + + it("should initialize the deposit", async () => { + assertContractCalledWith(depositorContract, "initializeDeposit", [ + { + version: "0x00000000", + inputVector: "0x11111111", + outputVector: "0x22222222", + locktime: "0x33333333", + }, + { + fundingOutputIndex: 2, + blindingFactor: "0xf9f0c90d00039523", + walletPubKeyHash: "0x8db50eb52063ea9d98b3eac91489a90f738986f6", + refundPubKeyHash: "0x28e081f285138ccbe389c1eb8985716230129f89", + refundLocktime: "0x60bcea61", + vault: "0x82883a4c7a8dd73ef165deb402d432613615ced4", + }, + "0x91fe5b7027c0cA767270bB1A474bA1338BA2A4d2", + ]) + }) + } + ) + + context( + "when L2 deposit owner is not properly encoded in the extra data", + () => { + it("should throw", async () => { + await expect( + depositorHandle.initializeDeposit( + depositTx, + depositOutputIndex, + { + ...deposit, + extraData: undefined, // Set empty extra data. + }, + vault + ) + ).to.be.rejectedWith("Extra data is required") + }) + } + ) + }) + }) + + describe("ArbitrumL2TBTCToken", () => { + let tokenContract: MockContract + let tokenHandle: ArbitrumL2TBTCToken + + beforeEach(async () => { + const [signer] = new MockProvider().getWallets() + + tokenContract = await deployMockContract( + signer, + `${JSON.stringify(ArbitrumL2TBTCTokenABI)}` + ) + + tokenHandle = new ArbitrumL2TBTCToken( + { + address: tokenContract.address, + signerOrProvider: signer, + }, + Chains.Arbitrum.ArbitrumSepolia + ) + }) + + describe("balanceOf", () => { + let balance: BigNumber + + const identifier: ChainIdentifier = EthereumAddress.from( + "934b98637ca318a4d6e7ca6ffd1690b8e77df637" + ) + + beforeEach(async () => { + await tokenContract.mock.balanceOf.returns(10) + + balance = await tokenHandle.balanceOf(identifier) + }) + + it("should call the contract with the right parameter", async () => { + assertContractCalledWith(tokenContract, "balanceOf", [ + "0x934b98637ca318a4d6e7ca6ffd1690b8e77df637", + ]) + }) + + it("should return the balance", async () => { + expect(balance).to.equal(10) + }) + }) + }) +}) diff --git a/typescript/test/lib/ethereum.test.ts b/typescript/test/lib/ethereum.test.ts index 3f65a4c97..674920a9c 100644 --- a/typescript/test/lib/ethereum.test.ts +++ b/typescript/test/lib/ethereum.test.ts @@ -29,6 +29,7 @@ import { abi as BridgeABI } from "@keep-network/tbtc-v2/artifacts/Bridge.json" import { abi as TBTCTokenABI } from "@keep-network/tbtc-v2/artifacts/TBTC.json" import { abi as WalletRegistryABI } from "@keep-network/ecdsa/artifacts/WalletRegistry.json" import { abi as BaseL1BitcoinDepositorABI } from "../../src/lib/ethereum/artifacts/sepolia/BaseL1BitcoinDepositor.json" +import { abi as ArbitrumL1BitcoinDepositorABI } from "../../src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json" chai.use(waffleChai) @@ -655,7 +656,7 @@ describe("Ethereum", () => { }) }) - describe("EthereumL1BitcoinDepositor", () => { + describe("EthereumL1BitcoinDepositor - BASE", () => { let depositorContract: MockContract let depositorHandle: EthereumL1BitcoinDepositor @@ -764,6 +765,115 @@ describe("Ethereum", () => { }) }) + describe("EthereumL1BitcoinDepositor - ARBITRUM", () => { + let depositorContract: MockContract + let depositorHandle: EthereumL1BitcoinDepositor + + beforeEach(async () => { + const [signer] = new MockProvider().getWallets() + + depositorContract = await deployMockContract( + signer, + // Use Arbitrum for testing but this can be any supported L2 chain. + `${JSON.stringify(ArbitrumL1BitcoinDepositorABI)}` + ) + + depositorHandle = new EthereumL1BitcoinDepositor( + { + address: depositorContract.address, + signerOrProvider: signer, + }, + Chains.Ethereum.Sepolia, + "Arbitrum" + ) + }) + + describe("initializeDeposit", () => { + // Just short byte strings for clarity. + const depositTx: BitcoinRawTxVectors = { + version: Hex.from("00000000"), + inputs: Hex.from("11111111"), + outputs: Hex.from("22222222"), + locktime: Hex.from("33333333"), + } + const depositOutputIndex: number = 2 + const deposit: DepositReceipt = { + depositor: EthereumAddress.from( + "934b98637ca318a4d6e7ca6ffd1690b8e77df637" + ), + walletPublicKeyHash: Hex.from( + "8db50eb52063ea9d98b3eac91489a90f738986f6" + ), + refundPublicKeyHash: Hex.from( + "28e081f285138ccbe389c1eb8985716230129f89" + ), + blindingFactor: Hex.from("f9f0c90d00039523"), + refundLocktime: Hex.from("60bcea61"), + extraData: Hex.from( + "00000000000000000000000091fe5b7027c0cA767270bB1A474bA1338BA2A4d2" + ), + } + const vault: ChainIdentifier = EthereumAddress.from( + "82883a4c7a8dd73ef165deb402d432613615ced4" + ) + + context( + "when L2 deposit owner is properly encoded in the extra data", + () => { + beforeEach(async () => { + await depositorContract.mock.initializeDeposit.returns() + + await depositorHandle.initializeDeposit( + depositTx, + depositOutputIndex, + deposit, + vault + ) + }) + + it("should initialize the deposit", async () => { + assertContractCalledWith(depositorContract, "initializeDeposit", [ + { + version: "0x00000000", + inputVector: "0x11111111", + outputVector: "0x22222222", + locktime: "0x33333333", + }, + { + fundingOutputIndex: 2, + blindingFactor: "0xf9f0c90d00039523", + walletPubKeyHash: "0x8db50eb52063ea9d98b3eac91489a90f738986f6", + refundPubKeyHash: "0x28e081f285138ccbe389c1eb8985716230129f89", + refundLocktime: "0x60bcea61", + vault: "0x82883a4c7a8dd73ef165deb402d432613615ced4", + }, + "0x91fe5b7027c0cA767270bB1A474bA1338BA2A4d2", + ]) + }) + } + ) + + context( + "when L2 deposit owner is not properly encoded in the extra data", + () => { + it("should throw", async () => { + await expect( + depositorHandle.initializeDeposit( + depositTx, + depositOutputIndex, + { + ...deposit, + extraData: undefined, // Set empty extra data. + }, + vault + ) + ).to.be.rejectedWith("Extra data is required") + }) + } + ) + }) + }) + describe("EthereumCrossChainExtraDataEncoder", () => { let encoder: EthereumCrossChainExtraDataEncoder diff --git a/typescript/test/services/deposits.test.ts b/typescript/test/services/deposits.test.ts index 05cdbdbc1..4e3ef33a2 100644 --- a/typescript/test/services/deposits.test.ts +++ b/typescript/test/services/deposits.test.ts @@ -1989,7 +1989,7 @@ describe("Deposits", () => { }) }) - describe("initiateCrossChainDeposit", () => { + describe("initiateCrossChainDeposit - BASE", () => { const l2DepositOwner = EthereumAddress.from( "934b98637ca318a4d6e7ca6ffd1690b8e77df637" ) @@ -2192,6 +2192,206 @@ describe("Deposits", () => { }) }) + describe("initiateCrossChainDeposit - ARBITRUM", () => { + const l2DepositOwner = EthereumAddress.from( + "934b98637ca318a4d6e7ca6ffd1690b8e77df637" + ) + const bitcoinClient = new MockBitcoinClient() + const tbtcContracts = new MockTBTCContracts() + let depositService: DepositsService + + context("when cross-chain contracts are not initialized", () => { + beforeEach(async () => { + depositService = new DepositsService( + tbtcContracts, + bitcoinClient, + // Mock cross-chain contracts resolver that always returns undefined. + (_: L2Chain) => undefined + ) + }) + + it("should throw", async () => { + await expect( + depositService.initiateCrossChainDeposit( + "mjc2zGWypwpNyDi4ZxGbBNnUA84bfgiwYc", + "Arbitrum" + ) + ).to.be.rejectedWith( + "Cross-chain contracts for Arbitrum not initialized" + ) + }) + }) + + context("when cross-chain contracts are initialized", () => { + let l2BitcoinDepositor: MockL2BitcoinDepositor + let l1BitcoinDepositor: MockL1BitcoinDepositor + let crossChainContracts: CrossChainContracts + + beforeEach(async () => { + const l2BitcoinDepositorEncoder = new MockCrossChainExtraDataEncoder() + // Set valid 32-byte extra data as initiateCrossChainDeposit + // performs length and content checks on the extra data. + l2BitcoinDepositorEncoder.setEncoding( + l2DepositOwner, + Hex.from(`000000000000000000000000${l2DepositOwner.identifierHex}`) + ) + l2BitcoinDepositor = new MockL2BitcoinDepositor( + EthereumAddress.from("49D1e49013Df517Ea30306DE2F462F2D0170212f"), + l2BitcoinDepositorEncoder + ) + + l1BitcoinDepositor = new MockL1BitcoinDepositor( + EthereumAddress.from("F4c1B212B37775769c73353264ac48dD7fA5B71E"), + new MockCrossChainExtraDataEncoder() + ) + + crossChainContracts = { + l2TbtcToken: new MockL2TBTCToken(), + l2BitcoinDepositor: l2BitcoinDepositor, + l1BitcoinDepositor: l1BitcoinDepositor, + } + + const crossChainContractsResolver = ( + l2ChainName: L2Chain + ): CrossChainContracts | undefined => { + if (l2ChainName === "Arbitrum") { + return crossChainContracts + } + } + + depositService = new DepositsService( + tbtcContracts, + bitcoinClient, + crossChainContractsResolver + ) + }) + + context("when L2 deposit owner cannot be resolved", () => { + it("should throw", async () => { + await expect( + depositService.initiateCrossChainDeposit( + "mjc2zGWypwpNyDi4ZxGbBNnUA84bfgiwYc", + "Arbitrum" + ) + ).to.be.rejectedWith("Cannot resolve L2 deposit owner") + }) + }) + + context("when L2 deposit owner can be resolved", () => { + beforeEach(async () => { + crossChainContracts.l2BitcoinDepositor.setDepositOwner(l2DepositOwner) + }) + + context("when active wallet is not set", () => { + it("should throw", async () => { + await expect( + depositService.initiateCrossChainDeposit( + "mjc2zGWypwpNyDi4ZxGbBNnUA84bfgiwYc", + "Arbitrum" + ) + ).to.be.rejectedWith("Could not get active wallet public key") + }) + }) + + context("when active wallet is set", () => { + beforeEach(async () => { + tbtcContracts.bridge.setActiveWalletPublicKey( + Hex.from( + "03989d253b17a6a0f41838b84ff0d20e8898f9d7b1a98f2564da4cc29dcf8581d9" + ) + ) + }) + + context("when recovery address is incorrect", () => { + it("should throw", async () => { + await expect( + depositService.initiateCrossChainDeposit( + "2N5WZpig3vgpSdjSherS2Lv7GnPuxCvkQjT", // p2sh address + "Arbitrum" + ) + ).to.be.rejectedWith( + "Bitcoin recovery address must be P2PKH or P2WPKH" + ) + }) + }) + + context("when recovery address is correct", () => { + const assertCommonDepositProperties = (receipt: DepositReceipt) => { + expect(receipt.depositor).to.be.equal( + l1BitcoinDepositor.getChainIdentifier() + ) + + expect(receipt.walletPublicKeyHash).to.be.deep.equal( + Hex.from("8db50eb52063ea9d98b3eac91489a90f738986f6") + ) + + // Expect the refund locktime to be in the future. + const receiptTimestamp = BigNumber.from( + receipt.refundLocktime.reverse().toPrefixedString() + ).toNumber() + const currentTimestamp = Math.floor(new Date().getTime() / 1000) + expect(receiptTimestamp).to.be.greaterThan(currentTimestamp) + + // Expect blinding factor to be set and 8-byte long. + expect(receipt.blindingFactor).not.to.be.undefined + expect(receipt.blindingFactor.toBuffer().length).to.be.equal(8) + + expect(receipt.extraData).to.be.eql( + Hex.from( + `000000000000000000000000${l2DepositOwner.identifierHex}` + ) + ) + } + + context("when recovery address is P2PKH", () => { + let deposit: Deposit + + beforeEach(async () => { + deposit = await depositService.initiateCrossChainDeposit( + "mjc2zGWypwpNyDi4ZxGbBNnUA84bfgiwYc", + "Arbitrum" + ) + }) + + it("should initiate deposit correctly", async () => { + // Inspect the deposit object by looking at its receipt. + const receipt = deposit.getReceipt() + + assertCommonDepositProperties(receipt) + + expect(receipt.refundPublicKeyHash).to.be.deep.equal( + Hex.from("2cd680318747b720d67bf4246eb7403b476adb34") + ) + }) + }) + + context("when recovery address is P2WPKH", () => { + let deposit: Deposit + + beforeEach(async () => { + deposit = await depositService.initiateCrossChainDeposit( + "tb1qumuaw3exkxdhtut0u85latkqfz4ylgwstkdzsx", + "Arbitrum" + ) + }) + + it("should initiate deposit correctly", async () => { + // Inspect the deposit object by looking at its receipt. + const receipt = deposit.getReceipt() + + assertCommonDepositProperties(receipt) + + expect(receipt.refundPublicKeyHash).to.be.deep.equal( + Hex.from("e6f9d74726b19b75f16fe1e9feaec048aa4fa1d0") + ) + }) + }) + }) + }) + }) + }) + }) + describe("DepositRefund", () => { const fee = BigNumber.from(1520) diff --git a/typescript/test/utils/mock-bridge.ts b/typescript/test/utils/mock-bridge.ts index a1340a892..fc78b1452 100644 --- a/typescript/test/utils/mock-bridge.ts +++ b/typescript/test/utils/mock-bridge.ts @@ -278,11 +278,21 @@ export class MockBridge implements Bridge { pendingRedemptions( walletPublicKey: Hex, redeemerOutputScript: Hex + ): Promise { + return this.pendingRedemptionsByWalletPKH( + BitcoinHashUtils.computeHash160(walletPublicKey), + redeemerOutputScript + ) + } + + pendingRedemptionsByWalletPKH( + walletPublicKeyHash: Hex, + redeemerOutputScript: Hex ): Promise { return new Promise((resolve, _) => { resolve( this.redemptions( - walletPublicKey, + walletPublicKeyHash, redeemerOutputScript, this._pendingRedemptions ) @@ -297,7 +307,7 @@ export class MockBridge implements Bridge { return new Promise((resolve, _) => { resolve( this.redemptions( - walletPublicKey, + BitcoinHashUtils.computeHash160(walletPublicKey), redeemerOutputScript, this._timedOutRedemptions ) @@ -306,12 +316,12 @@ export class MockBridge implements Bridge { } private redemptions( - walletPublicKey: Hex, + walletPublicKeyHash: Hex, redeemerOutputScript: Hex, redemptionsMap: Map ): RedemptionRequest { const redemptionKey = MockBridge.buildRedemptionKey( - BitcoinHashUtils.computeHash160(walletPublicKey), + walletPublicKeyHash, redeemerOutputScript ) diff --git a/typescript/yarn.lock b/typescript/yarn.lock index 50dcebc13..82e30e919 100644 --- a/typescript/yarn.lock +++ b/typescript/yarn.lock @@ -1644,26 +1644,11 @@ rxjs "6" semver "^7.3.5" -"@ledgerhq/devices@^8.0.7": - version "8.0.7" - resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-8.0.7.tgz#206434dbd8a097529bbfc95f5eef94c2923c7578" - integrity sha512-BbPyET52lXnVs7CxJWrGYqmtGdbGzj+XnfCqLsDnA7QYr1CZREysxmie+Rr6BKpNDBRVesAovXjtaVaZOn+upw== - dependencies: - "@ledgerhq/errors" "^6.14.0" - "@ledgerhq/logs" "^6.10.1" - rxjs "6" - semver "^7.3.5" - "@ledgerhq/errors@^5.50.0": version "5.50.0" resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.50.0.tgz#e3a6834cb8c19346efca214c1af84ed28e69dad9" integrity sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow== -"@ledgerhq/errors@^6.14.0": - version "6.14.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-6.14.0.tgz#0bf253983773ef12eebce2091f463bc719223b37" - integrity sha512-ZWJw2Ti6Dq1Ott/+qYqJdDWeZm16qI3VNG5rFlb0TQ3UcAyLIQZbnnzzdcVVwVeZiEp66WIpINd/pBdqsHVyOA== - "@ledgerhq/hw-app-eth@^5.11.0": version "5.53.0" resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-5.53.0.tgz#5df2d7427db9f387099d0cc437e9730101d7c404" @@ -1685,44 +1670,11 @@ "@ledgerhq/errors" "^5.50.0" events "^3.3.0" -"@ledgerhq/hw-transport@^6.28.8": - version "6.28.8" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-6.28.8.tgz#f99a5c71c5c09591e9bfb1b970c42aafbe81351f" - integrity sha512-XxQVl4htd018u/M66r0iu5nlHi+J6QfdPsORzDF6N39jaz+tMqItb7tUlXM/isggcuS5lc7GJo7NOuJ8rvHZaQ== - dependencies: - "@ledgerhq/devices" "^8.0.7" - "@ledgerhq/errors" "^6.14.0" - events "^3.3.0" - "@ledgerhq/logs@^5.50.0": version "5.50.0" resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.50.0.tgz#29c6419e8379d496ab6d0426eadf3c4d100cd186" integrity sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA== -"@ledgerhq/logs@^6.10.1": - version "6.10.1" - resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-6.10.1.tgz#5bd16082261d7364eabb511c788f00937dac588d" - integrity sha512-z+ILK8Q3y+nfUl43ctCPuR4Y2bIxk/ooCQFwZxhtci1EhAtMDzMAx2W25qx8G1PPL9UUOdnUax19+F0OjXoj4w== - -"@ledgerhq/wallet-api-client@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@ledgerhq/wallet-api-client/-/wallet-api-client-1.2.1.tgz#b47fe5b4f431282f50ddb64c8abb911545593eba" - integrity sha512-uTBTZCpbLTM5y5Cd7ioQB0lcq0b3cbrU2bGzCiKuY1IEd0NUyFhr2dKliRrcLoMPDRtQRmRnSxeX0BFKinoo8Q== - dependencies: - "@ledgerhq/hw-transport" "^6.28.8" - "@ledgerhq/wallet-api-core" "1.3.1" - bignumber.js "^9.1.2" - -"@ledgerhq/wallet-api-core@1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@ledgerhq/wallet-api-core/-/wallet-api-core-1.3.1.tgz#092d027a6d9ce7139a2d4c157480e2feb7c88489" - integrity sha512-yOeb1tfdwF6NdxVEIVr8SVz5iOyh6asWa0bbuCyMpiLrfuVS/Wkr6OeDMBYSxWxXxRFmQDJ9XQxdtSS+MGNk1Q== - dependencies: - "@ledgerhq/errors" "^6.14.0" - bignumber.js "^9.1.2" - uuid "^9.0.0" - zod "^3.22.2" - "@noble/hashes@^1.1.5", "@noble/hashes@^1.2.0": version "1.3.2" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" @@ -7994,11 +7946,6 @@ uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" - integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== - v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" @@ -9145,8 +9092,3 @@ yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -zod@^3.22.2: - version "3.22.4" - resolved "https://registry.yarnpkg.com/zod/-/zod-3.22.4.tgz#f31c3a9386f61b1f228af56faa9255e845cf3fff" - integrity sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==