From 991c891c0417ea5d48bc0e5f866a7535a1e0f74f Mon Sep 17 00:00:00 2001 From: JSanchezFDZ Date: Wed, 10 Jul 2024 13:25:19 +0200 Subject: [PATCH 01/10] [FEAT] Added Arbitrum artifacts --- .../ArbitrumL2BitcoinDepositor.json | 0 .../ArbitrumL2BitcoinDepositor.json | 429 +++++++++ .../artifacts/arbitrumOne/ArbitrumTBTC.json | 863 ++++++++++++++++++ .../ArbitrumL2BitcoinDepositor.json | 429 +++++++++ .../arbitrumSepolia/ArbitrumTBTC.json | 863 ++++++++++++++++++ .../sepolia/ArbitrumL1BitcoinDepositor.json | 681 ++++++++++++++ 6 files changed, 3265 insertions(+) create mode 100644 cross-chain/arbitrum/deployments/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json create mode 100644 typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumL2BitcoinDepositor.json create mode 100644 typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumTBTC.json create mode 100644 typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json create mode 100644 typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumTBTC.json create mode 100644 typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json diff --git a/cross-chain/arbitrum/deployments/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json b/cross-chain/arbitrum/deployments/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json new file mode 100644 index 000000000..e69de29bb 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..9cd6888d8 --- /dev/null +++ b/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumL2BitcoinDepositor.json @@ -0,0 +1,429 @@ +{ + "address": "", + "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..9649f7858 --- /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" +} \ No newline at end of file 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..9cd6888d8 --- /dev/null +++ b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json @@ -0,0 +1,429 @@ +{ + "address": "", + "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/arbitrumSepolia/ArbitrumTBTC.json b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumTBTC.json new file mode 100644 index 000000000..59d5ba1e5 --- /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" +} \ No newline at end of file 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..90bc436bc --- /dev/null +++ b/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json @@ -0,0 +1,681 @@ +{ + "address": "", + "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": 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": [], + "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": "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": "0x5a405183332f623649fcf19f8506cf2582882d5dc2b05582e0066388ef122229", + "receipt": { + "to": null, + "from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", + "contractAddress": "0x0c5e36731008f4AFC1AF5Da2C4D5E07eE4a3EB69", + "transactionIndex": 94, + "gasUsed": "887851", + "logsBloom": "0x00000000000000000000000000000000400000000000000400800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000202000001000000000000000000000000000000000000020000000000000000000800000000800000000000000008000000400000000200000000000000000000000000000040000080000000000000800000000000000000000000000000000400000000000000000000000000000010000000000020000000000000200020040000000000000400000000000000000020000000000000000000000000000000100000000000000000000000000000000000", + "blockHash": "0x9d4a08d2b6fd26df76447aa1b5e0054686b1d462dc12be4d271dca1299060a2c", + "transactionHash": "0x5a405183332f623649fcf19f8506cf2582882d5dc2b05582e0066388ef122229", + "logs": [ + { + "transactionIndex": 94, + "blockNumber": 5441536, + "transactionHash": "0x5a405183332f623649fcf19f8506cf2582882d5dc2b05582e0066388ef122229", + "address": "0x0c5e36731008f4AFC1AF5Da2C4D5E07eE4a3EB69", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000720cb49a8b3c03e199075544f7f1f4d772dd6d06" + ], + "data": "0x", + "logIndex": 75, + "blockHash": "0x9d4a08d2b6fd26df76447aa1b5e0054686b1d462dc12be4d271dca1299060a2c" + }, + { + "transactionIndex": 94, + "blockNumber": 5441536, + "transactionHash": "0x5a405183332f623649fcf19f8506cf2582882d5dc2b05582e0066388ef122229", + "address": "0x0c5e36731008f4AFC1AF5Da2C4D5E07eE4a3EB69", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc" + ], + "data": "0x", + "logIndex": 76, + "blockHash": "0x9d4a08d2b6fd26df76447aa1b5e0054686b1d462dc12be4d271dca1299060a2c" + }, + { + "transactionIndex": 94, + "blockNumber": 5441536, + "transactionHash": "0x5a405183332f623649fcf19f8506cf2582882d5dc2b05582e0066388ef122229", + "address": "0x0c5e36731008f4AFC1AF5Da2C4D5E07eE4a3EB69", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 77, + "blockHash": "0x9d4a08d2b6fd26df76447aa1b5e0054686b1d462dc12be4d271dca1299060a2c" + }, + { + "transactionIndex": 94, + "blockNumber": 5441536, + "transactionHash": "0x5a405183332f623649fcf19f8506cf2582882d5dc2b05582e0066388ef122229", + "address": "0x0c5e36731008f4AFC1AF5Da2C4D5E07eE4a3EB69", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dd0007713cb99564b7835fd628a1718e8f9f9785", + "logIndex": 78, + "blockHash": "0x9d4a08d2b6fd26df76447aa1b5e0054686b1d462dc12be4d271dca1299060a2c" + } + ], + "blockNumber": 5441536, + "cumulativeGasUsed": "8903785", + "status": 1, + "byzantium": true + }, + "numDeployments": 1, + "implementation": "0x720Cb49A8b3c03E199075544F7f1F4d772Dd6d06", + "devdoc": "Contract deployed as upgradable proxy" +} From 3800cba8eada058c15b6aedeaf0f23ac20fa75b1 Mon Sep 17 00:00:00 2001 From: JSanchezFDZ Date: Wed, 10 Jul 2024 13:26:23 +0200 Subject: [PATCH 02/10] [FEAT] Added Arbitrum logic --- .../ArbitrumL1BitcoinDepositorUpgraded.sol | 15 +++ .../ArbitrumL2BitcoinDepositorUpgraded.sol | 15 +++ .../deploy_helpers/wormhole_chains.ts | 32 +++++ typescript/src/index.ts | 1 + typescript/src/lib/arbitrum/index.ts | 45 +++++++ .../src/lib/arbitrum/l2-bitcoin-depositor.ts | 122 ++++++++++++++++++ typescript/src/lib/arbitrum/l2-tbtc-token.ts | 56 ++++++++ typescript/src/lib/contracts/chain.ts | 20 +++ .../src/lib/ethereum/l1-bitcoin-depositor.ts | 11 ++ typescript/src/services/tbtc.ts | 10 ++ 10 files changed, 327 insertions(+) create mode 100644 cross-chain/arbitrum/contracts/test/ArbitrumL1BitcoinDepositorUpgraded.sol create mode 100644 cross-chain/arbitrum/contracts/test/ArbitrumL2BitcoinDepositorUpgraded.sol create mode 100644 cross-chain/arbitrum/deploy_helpers/wormhole_chains.ts create mode 100644 typescript/src/lib/arbitrum/index.ts create mode 100644 typescript/src/lib/arbitrum/l2-bitcoin-depositor.ts create mode 100644 typescript/src/lib/arbitrum/l2-tbtc-token.ts diff --git a/cross-chain/arbitrum/contracts/test/ArbitrumL1BitcoinDepositorUpgraded.sol b/cross-chain/arbitrum/contracts/test/ArbitrumL1BitcoinDepositorUpgraded.sol new file mode 100644 index 000000000..1caa8f1d5 --- /dev/null +++ b/cross-chain/arbitrum/contracts/test/ArbitrumL1BitcoinDepositorUpgraded.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.17; + +import "@keep-network/tbtc-v2/contracts/l2/L1BitcoinDepositor.sol"; + +/// @notice L1BitcoinDepositor for Arbitrum - upgraded version. +/// @dev This contract is intended solely for testing purposes. +contract ArbitrumL1BitcoinDepositorUpgraded is L1BitcoinDepositor { + string public newVar; + + function initializeV2(string memory _newVar) public { + newVar = _newVar; + } +} \ No newline at end of file diff --git a/cross-chain/arbitrum/contracts/test/ArbitrumL2BitcoinDepositorUpgraded.sol b/cross-chain/arbitrum/contracts/test/ArbitrumL2BitcoinDepositorUpgraded.sol new file mode 100644 index 000000000..4a042d59b --- /dev/null +++ b/cross-chain/arbitrum/contracts/test/ArbitrumL2BitcoinDepositorUpgraded.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.17; + +import "@keep-network/tbtc-v2/contracts/l2/L2BitcoinDepositor.sol"; + +/// @notice L2BitcoinDepositor for Arbitrum - upgraded version. +/// @dev This contract is intended solely for testing purposes. +contract ArbitrumL2BitcoinDepositorUpgraded is L2BitcoinDepositor { + string public newVar; + + function initializeV2(string memory _newVar) public { + newVar = _newVar; + } +} \ No newline at end of file diff --git a/cross-chain/arbitrum/deploy_helpers/wormhole_chains.ts b/cross-chain/arbitrum/deploy_helpers/wormhole_chains.ts new file mode 100644 index 000000000..436011f0f --- /dev/null +++ b/cross-chain/arbitrum/deploy_helpers/wormhole_chains.ts @@ -0,0 +1,32 @@ +export type WormholeChains = { + l1ChainId: number + l2ChainId: number +} + +/** + * Returns Wormhole L1 and L2 chain IDs for the given network. + * Source: https://docs.wormhole.com/wormhole/reference/constants#chain-ids + * @param network Network name. + */ +export function getWormholeChains(network: string): WormholeChains { + let l1ChainId: number + let l2ChainId: number + + switch (network) { + case "mainnet": + case "arbitrum": + l1ChainId = 2 // L1 Ethereum mainnet + l2ChainId = 23 // L2 Arbitrum mainnet + break + case "sepolia": + case "arbitrumSepolia": + l1ChainId = 10002 // L1 Ethereum Sepolia testnet + l2ChainId = 10003 // L2 Arbitrum Sepolia testnet + break + + default: + throw new Error("Unsupported network") + } + + return { l1ChainId, l2ChainId } +} 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/index.ts b/typescript/src/lib/arbitrum/index.ts new file mode 100644 index 000000000..a8cdc11d4 --- /dev/null +++ b/typescript/src/lib/arbitrum/index.ts @@ -0,0 +1,45 @@ +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/chain.ts b/typescript/src/lib/contracts/chain.ts index 1393e3acd..4fe6c91a4 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,12 +37,18 @@ export type ChainMapping = { * Identifier of the Base L2 chain. */ base?: Chains.Base + + /** + * Identifier of the Arbitrum L2 chain. + */ + arbitrum?: Chains.Arbitrum } /** * List of chain mappings supported by tBTC v2 contracts. */ export const ChainMappings: ChainMapping[] = [ + // Ethereum Mainnet to Base + TESTNETs { ethereum: Chains.Ethereum.Mainnet, base: Chains.Base.Base, @@ -46,4 +57,13 @@ export const ChainMappings: ChainMapping[] = [ ethereum: Chains.Ethereum.Sepolia, base: Chains.Base.BaseSepolia, }, + // Ethereum Mainnet to Arbitrum + TESTNETs + { + ethereum: Chains.Ethereum.Mainnet, + arbitrum: Chains.Arbitrum.Arbitrum, + } + { + ethereum: Chains.Ethereum.Sepolia, + arbitrum: Chains.Arbitrum.ArbitrumSepolia, + } ] diff --git a/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts b/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts index 9e49c481f..e777e5e06 100644 --- a/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts +++ b/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts @@ -18,7 +18,12 @@ 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 +31,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 +44,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/services/tbtc.ts b/typescript/src/services/tbtc.ts index 84c759ef4..e3b7dd05f 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. @@ -225,6 +226,15 @@ 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 + ) default: throw new Error("Unsupported L2 chain") } From 750031688dc5d3ec2ba80358720ec1e596d670b5 Mon Sep 17 00:00:00 2001 From: JSanchezFDZ Date: Wed, 10 Jul 2024 14:52:12 +0200 Subject: [PATCH 03/10] [FIX] Update Arbitrum contract address --- .../artifacts/arbitrumOne/ArbitrumL2BitcoinDepositor.json | 2 +- .../artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json | 2 +- .../ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumL2BitcoinDepositor.json b/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumL2BitcoinDepositor.json index 9cd6888d8..0af34abd3 100644 --- a/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumL2BitcoinDepositor.json +++ b/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumL2BitcoinDepositor.json @@ -1,5 +1,5 @@ { - "address": "", + "address": "0xf90292a39014033DE50c81f651365cB6A1040Bb6", "abi": [ { "inputs": [], diff --git a/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json index 9cd6888d8..0af34abd3 100644 --- a/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json +++ b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json @@ -1,5 +1,5 @@ { - "address": "", + "address": "0xf90292a39014033DE50c81f651365cB6A1040Bb6", "abi": [ { "inputs": [], diff --git a/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json b/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json index 90bc436bc..e926b14dd 100644 --- a/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json +++ b/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json @@ -1,5 +1,5 @@ { - "address": "", + "address": "0xE4835Ef9185847d1b7891267f3181172F7B96753", "abi": [ { "inputs": [], From bd11d071cb22e3ed0230c34e86d508d8621a430d Mon Sep 17 00:00:00 2001 From: JSanchezFDZ Date: Wed, 10 Jul 2024 18:06:15 +0200 Subject: [PATCH 04/10] [UPDATE] Arbitrum artifacts --- .../ArbitrumL2BitcoinDepositor.json | 429 ++++++++++++++++++ .../ArbitrumL2BitcoinDepositor.json | 80 ++-- .../sepolia/ArbitrumL1BitcoinDepositor.json | 136 ++++-- 3 files changed, 565 insertions(+), 80 deletions(-) diff --git a/cross-chain/arbitrum/deployments/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json b/cross-chain/arbitrum/deployments/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json index e69de29bb..69cc79cd7 100644 --- a/cross-chain/arbitrum/deployments/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json +++ b/cross-chain/arbitrum/deployments/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" +} \ No newline at end of file diff --git a/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json index 0af34abd3..69cc79cd7 100644 --- a/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json +++ b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json @@ -1,5 +1,5 @@ { - "address": "0xf90292a39014033DE50c81f651365cB6A1040Bb6", + "address": "0xB2fEC598a9374078Bb639f3d70555fc4389b7a78", "abi": [ { "inputs": [], @@ -355,75 +355,75 @@ "type": "function" } ], - "transactionHash": "0xaeb9ee6679e0f96108788abffa9ed78c943c09565686dfdb826378e9bd1487df", + "transactionHash": "0x43cb5d1e101836fcb61fa9daefa99319a0273b1fafcf0fe011b57483e02b578d", "receipt": { "to": null, - "from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", - "contractAddress": "0x04BE8F183572ec802aD26756F3E9398098700E76", - "transactionIndex": 2, - "gasUsed": "704802", - "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000202000001000000000000000000000000000000000000020000000000000000000800000000800000000000000000000000400002000200000000000000000000000000000000000080000000000000800080000000000000000000000000000400000000000100000000000000000000000000000020000000000000000020040000000008000400000000000000000020000000000000000000080000000000000000000000000000000000000000400000", - "blockHash": "0xcb1f5aa73f2f63d359224b51e7abf66a431e3420daa6940b72a3a58dd5a00c85", - "transactionHash": "0xaeb9ee6679e0f96108788abffa9ed78c943c09565686dfdb826378e9bd1487df", + "from": "0x992500f42A48371c2c9f91EE6165ba8F9dfB1692", + "contractAddress": "0xB2fEC598a9374078Bb639f3d70555fc4389b7a78", + "transactionIndex": 1, + "gasUsed": "1819206", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000020000000000000000000000080200000000030000000000000000000000000000000000002000001000000000000000002000000000000000000020000000000000000000800000000800000000000000000000000400000000000000000000000002000000000000000000080000000000000800000000000000000000000000000000400000000000000000000000000000000000000000020000000000000000000040000000000000400000000000000000020000000000800000000400000000000000000000000000000000000000000000000", + "blockHash": "0xe28c099c49fa263d666a02e7be27845647250097dbf1ec335811e1b83c65ca1d", + "transactionHash": "0x43cb5d1e101836fcb61fa9daefa99319a0273b1fafcf0fe011b57483e02b578d", "logs": [ { - "transactionIndex": 2, - "blockNumber": 7063584, - "transactionHash": "0xaeb9ee6679e0f96108788abffa9ed78c943c09565686dfdb826378e9bd1487df", - "address": "0x04BE8F183572ec802aD26756F3E9398098700E76", + "transactionIndex": 1, + "blockNumber": 62644268, + "transactionHash": "0x43cb5d1e101836fcb61fa9daefa99319a0273b1fafcf0fe011b57483e02b578d", + "address": "0xB2fEC598a9374078Bb639f3d70555fc4389b7a78", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x0000000000000000000000001ecd87c8d510a7390a561ae0ac54fbe7e5125bcf" + "0x00000000000000000000000077bf510b1c0aa46e3006724d9803a49c36da4e8f" ], "data": "0x", - "logIndex": 1, - "blockHash": "0xcb1f5aa73f2f63d359224b51e7abf66a431e3420daa6940b72a3a58dd5a00c85" + "logIndex": 0, + "blockHash": "0xe28c099c49fa263d666a02e7be27845647250097dbf1ec335811e1b83c65ca1d" }, { - "transactionIndex": 2, - "blockNumber": 7063584, - "transactionHash": "0xaeb9ee6679e0f96108788abffa9ed78c943c09565686dfdb826378e9bd1487df", - "address": "0x04BE8F183572ec802aD26756F3E9398098700E76", + "transactionIndex": 1, + "blockNumber": 62644268, + "transactionHash": "0x43cb5d1e101836fcb61fa9daefa99319a0273b1fafcf0fe011b57483e02b578d", + "address": "0xB2fEC598a9374078Bb639f3d70555fc4389b7a78", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc" + "0x000000000000000000000000992500f42a48371c2c9f91ee6165ba8f9dfb1692" ], "data": "0x", - "logIndex": 2, - "blockHash": "0xcb1f5aa73f2f63d359224b51e7abf66a431e3420daa6940b72a3a58dd5a00c85" + "logIndex": 1, + "blockHash": "0xe28c099c49fa263d666a02e7be27845647250097dbf1ec335811e1b83c65ca1d" }, { - "transactionIndex": 2, - "blockNumber": 7063584, - "transactionHash": "0xaeb9ee6679e0f96108788abffa9ed78c943c09565686dfdb826378e9bd1487df", - "address": "0x04BE8F183572ec802aD26756F3E9398098700E76", + "transactionIndex": 1, + "blockNumber": 62644268, + "transactionHash": "0x43cb5d1e101836fcb61fa9daefa99319a0273b1fafcf0fe011b57483e02b578d", + "address": "0xB2fEC598a9374078Bb639f3d70555fc4389b7a78", "topics": [ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 3, - "blockHash": "0xcb1f5aa73f2f63d359224b51e7abf66a431e3420daa6940b72a3a58dd5a00c85" + "logIndex": 2, + "blockHash": "0xe28c099c49fa263d666a02e7be27845647250097dbf1ec335811e1b83c65ca1d" }, { - "transactionIndex": 2, - "blockNumber": 7063584, - "transactionHash": "0xaeb9ee6679e0f96108788abffa9ed78c943c09565686dfdb826378e9bd1487df", - "address": "0x04BE8F183572ec802aD26756F3E9398098700E76", + "transactionIndex": 1, + "blockNumber": 62644268, + "transactionHash": "0x43cb5d1e101836fcb61fa9daefa99319a0273b1fafcf0fe011b57483e02b578d", + "address": "0xB2fEC598a9374078Bb639f3d70555fc4389b7a78", "topics": [ "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b2f6c5b73239c39360ee0ea95047565dab13e3c7", - "logIndex": 4, - "blockHash": "0xcb1f5aa73f2f63d359224b51e7abf66a431e3420daa6940b72a3a58dd5a00c85" + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f07fac18ea91bec2a8f766c22c49cc32b078e14", + "logIndex": 3, + "blockHash": "0xe28c099c49fa263d666a02e7be27845647250097dbf1ec335811e1b83c65ca1d" } ], - "blockNumber": 7063584, - "cumulativeGasUsed": "804788", + "blockNumber": 62644268, + "cumulativeGasUsed": "1819206", "status": 1, "byzantium": true }, "numDeployments": 1, - "implementation": "0x1Ecd87C8D510A7390a561AE0Ac54FBe7e5125BcF", + "implementation": "0x77Bf510B1C0aA46e3006724d9803a49c36da4E8f", "devdoc": "Contract deployed as upgradable proxy" -} +} \ No newline at end of file diff --git a/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json b/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json index e926b14dd..cec9cc3d7 100644 --- a/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json +++ b/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json @@ -1,5 +1,5 @@ { - "address": "0xE4835Ef9185847d1b7891267f3181172F7B96753", + "address": "0xD9B523fb879C63b00ef14e48C98f4e3398d3BA2D", "abi": [ { "inputs": [], @@ -132,6 +132,25 @@ "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": [ @@ -464,6 +483,25 @@ "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", @@ -554,6 +592,24 @@ "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": [ { @@ -607,75 +663,75 @@ "type": "function" } ], - "transactionHash": "0x5a405183332f623649fcf19f8506cf2582882d5dc2b05582e0066388ef122229", + "transactionHash": "0x2673ee5eb6ce999663c7897ab29bf0e0fda955dccc1f7d374968322d0148ade3", "receipt": { "to": null, - "from": "0x68ad60CC5e8f3B7cC53beaB321cf0e6036962dBc", - "contractAddress": "0x0c5e36731008f4AFC1AF5Da2C4D5E07eE4a3EB69", - "transactionIndex": 94, - "gasUsed": "887851", - "logsBloom": "0x00000000000000000000000000000000400000000000000400800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000202000001000000000000000000000000000000000000020000000000000000000800000000800000000000000008000000400000000200000000000000000000000000000040000080000000000000800000000000000000000000000000000400000000000000000000000000000010000000000020000000000000200020040000000000000400000000000000000020000000000000000000000000000000100000000000000000000000000000000000", - "blockHash": "0x9d4a08d2b6fd26df76447aa1b5e0054686b1d462dc12be4d271dca1299060a2c", - "transactionHash": "0x5a405183332f623649fcf19f8506cf2582882d5dc2b05582e0066388ef122229", + "from": "0x992500f42A48371c2c9f91EE6165ba8F9dfB1692", + "contractAddress": "0xD9B523fb879C63b00ef14e48C98f4e3398d3BA2D", + "transactionIndex": 46, + "gasUsed": "866135", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000020000000000000000000000280000000080000000000000000000000000000000000000002000001000000000000000000000000000000000000020000000000000000000800000000800000000000000000000000400000000000000000000000000000000000000000000080000000000000800004000000000000000000000000000400000000000000000800000000000000000000000020010000000000000000040000000000000400000000000000000020000000000800000000000000000000000000000000000000000000000000000000", + "blockHash": "0x10400e7cfcdc42e3080b7580fcaa58ba8a8023b10d785a58db624c9a7fdc8b2f", + "transactionHash": "0x2673ee5eb6ce999663c7897ab29bf0e0fda955dccc1f7d374968322d0148ade3", "logs": [ { - "transactionIndex": 94, - "blockNumber": 5441536, - "transactionHash": "0x5a405183332f623649fcf19f8506cf2582882d5dc2b05582e0066388ef122229", - "address": "0x0c5e36731008f4AFC1AF5Da2C4D5E07eE4a3EB69", + "transactionIndex": 46, + "blockNumber": 6281003, + "transactionHash": "0x2673ee5eb6ce999663c7897ab29bf0e0fda955dccc1f7d374968322d0148ade3", + "address": "0xD9B523fb879C63b00ef14e48C98f4e3398d3BA2D", "topics": [ "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", - "0x000000000000000000000000720cb49a8b3c03e199075544f7f1f4d772dd6d06" + "0x000000000000000000000000f90292a39014033de50c81f651365cb6a1040bb6" ], "data": "0x", - "logIndex": 75, - "blockHash": "0x9d4a08d2b6fd26df76447aa1b5e0054686b1d462dc12be4d271dca1299060a2c" + "logIndex": 78, + "blockHash": "0x10400e7cfcdc42e3080b7580fcaa58ba8a8023b10d785a58db624c9a7fdc8b2f" }, { - "transactionIndex": 94, - "blockNumber": 5441536, - "transactionHash": "0x5a405183332f623649fcf19f8506cf2582882d5dc2b05582e0066388ef122229", - "address": "0x0c5e36731008f4AFC1AF5Da2C4D5E07eE4a3EB69", + "transactionIndex": 46, + "blockNumber": 6281003, + "transactionHash": "0x2673ee5eb6ce999663c7897ab29bf0e0fda955dccc1f7d374968322d0148ade3", + "address": "0xD9B523fb879C63b00ef14e48C98f4e3398d3BA2D", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000068ad60cc5e8f3b7cc53beab321cf0e6036962dbc" + "0x000000000000000000000000992500f42a48371c2c9f91ee6165ba8f9dfb1692" ], "data": "0x", - "logIndex": 76, - "blockHash": "0x9d4a08d2b6fd26df76447aa1b5e0054686b1d462dc12be4d271dca1299060a2c" + "logIndex": 79, + "blockHash": "0x10400e7cfcdc42e3080b7580fcaa58ba8a8023b10d785a58db624c9a7fdc8b2f" }, { - "transactionIndex": 94, - "blockNumber": 5441536, - "transactionHash": "0x5a405183332f623649fcf19f8506cf2582882d5dc2b05582e0066388ef122229", - "address": "0x0c5e36731008f4AFC1AF5Da2C4D5E07eE4a3EB69", + "transactionIndex": 46, + "blockNumber": 6281003, + "transactionHash": "0x2673ee5eb6ce999663c7897ab29bf0e0fda955dccc1f7d374968322d0148ade3", + "address": "0xD9B523fb879C63b00ef14e48C98f4e3398d3BA2D", "topics": [ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000001", - "logIndex": 77, - "blockHash": "0x9d4a08d2b6fd26df76447aa1b5e0054686b1d462dc12be4d271dca1299060a2c" + "logIndex": 80, + "blockHash": "0x10400e7cfcdc42e3080b7580fcaa58ba8a8023b10d785a58db624c9a7fdc8b2f" }, { - "transactionIndex": 94, - "blockNumber": 5441536, - "transactionHash": "0x5a405183332f623649fcf19f8506cf2582882d5dc2b05582e0066388ef122229", - "address": "0x0c5e36731008f4AFC1AF5Da2C4D5E07eE4a3EB69", + "transactionIndex": 46, + "blockNumber": 6281003, + "transactionHash": "0x2673ee5eb6ce999663c7897ab29bf0e0fda955dccc1f7d374968322d0148ade3", + "address": "0xD9B523fb879C63b00ef14e48C98f4e3398d3BA2D", "topics": [ "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" ], - "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dd0007713cb99564b7835fd628a1718e8f9f9785", - "logIndex": 78, - "blockHash": "0x9d4a08d2b6fd26df76447aa1b5e0054686b1d462dc12be4d271dca1299060a2c" + "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000008d58747ef805317270ff7f8e51a8018d3488b17b", + "logIndex": 81, + "blockHash": "0x10400e7cfcdc42e3080b7580fcaa58ba8a8023b10d785a58db624c9a7fdc8b2f" } ], - "blockNumber": 5441536, - "cumulativeGasUsed": "8903785", + "blockNumber": 6281003, + "cumulativeGasUsed": "11146181", "status": 1, "byzantium": true }, "numDeployments": 1, - "implementation": "0x720Cb49A8b3c03E199075544F7f1F4d772Dd6d06", + "implementation": "0xf90292a39014033DE50c81f651365cB6A1040Bb6", "devdoc": "Contract deployed as upgradable proxy" -} +} \ No newline at end of file From 4cd909b6a7579cdb32aa56d49ca92c251d936dfb Mon Sep 17 00:00:00 2001 From: JSanchezFDZ Date: Thu, 11 Jul 2024 09:47:42 +0200 Subject: [PATCH 05/10] [FEAT] Arbitrum tests --- typescript/test/lib/arbitrum.test.ts | 178 +++++++++++++++++++ typescript/test/lib/ethereum.test.ts | 112 +++++++++++- typescript/test/services/deposits.test.ts | 205 +++++++++++++++++++++- 3 files changed, 493 insertions(+), 2 deletions(-) create mode 100644 typescript/test/lib/arbitrum.test.ts diff --git a/typescript/test/lib/arbitrum.test.ts b/typescript/test/lib/arbitrum.test.ts new file mode 100644 index 000000000..71f755603 --- /dev/null +++ b/typescript/test/lib/arbitrum.test.ts @@ -0,0 +1,178 @@ +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) + }) + }) + }) + }) + \ No newline at end of file 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..fa9859c95 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,209 @@ 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) From 80b2a065063a6d7cfb6e61df5238cbd629718e11 Mon Sep 17 00:00:00 2001 From: JSanchezFDZ Date: Mon, 15 Jul 2024 21:59:22 +0200 Subject: [PATCH 06/10] [FIX] Build compilation errors --- .../artifacts/arbitrumOne/ArbitrumTBTC.json | 2 +- .../ArbitrumL2BitcoinDepositor.json | 2 +- .../arbitrumSepolia/ArbitrumTBTC.json | 2 +- typescript/src/lib/arbitrum/index.ts | 5 +- typescript/src/lib/contracts/chain.ts | 4 +- .../sepolia/ArbitrumL1BitcoinDepositor.json | 2 +- .../src/lib/ethereum/l1-bitcoin-depositor.ts | 2 - typescript/test/lib/arbitrum.test.ts | 331 +++++++++--------- typescript/test/services/deposits.test.ts | 13 +- 9 files changed, 180 insertions(+), 183 deletions(-) diff --git a/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumTBTC.json b/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumTBTC.json index 9649f7858..0a1f11eb0 100644 --- a/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumTBTC.json +++ b/typescript/src/lib/arbitrum/artifacts/arbitrumOne/ArbitrumTBTC.json @@ -860,4 +860,4 @@ "numDeployments": 1, "implementation": "0xDa534b567099Ca481384133bC121D5843F681365", "devdoc": "Contract deployed as upgradable proxy" -} \ No newline at end of file +} diff --git a/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json index 69cc79cd7..21e1cdce4 100644 --- a/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json +++ b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json @@ -426,4 +426,4 @@ "numDeployments": 1, "implementation": "0x77Bf510B1C0aA46e3006724d9803a49c36da4E8f", "devdoc": "Contract deployed as upgradable proxy" -} \ No newline at end of file +} diff --git a/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumTBTC.json b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumTBTC.json index 59d5ba1e5..68f1fdea7 100644 --- a/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumTBTC.json +++ b/typescript/src/lib/arbitrum/artifacts/arbitrumSepolia/ArbitrumTBTC.json @@ -860,4 +860,4 @@ "numDeployments": 1, "implementation": "0x1e9E56Acdb2987DCe23Eb6E751C22d4f89296a06", "devdoc": "Contract deployed as upgradable proxy" -} \ No newline at end of file +} diff --git a/typescript/src/lib/arbitrum/index.ts b/typescript/src/lib/arbitrum/index.ts index a8cdc11d4..4fe471b90 100644 --- a/typescript/src/lib/arbitrum/index.ts +++ b/typescript/src/lib/arbitrum/index.ts @@ -36,7 +36,10 @@ export async function loadArbitrumCrossChainContracts( ) l2BitcoinDepositor.setDepositOwner(await ethereumAddressFromSigner(signer)) - const l2TbtcToken = new ArbitrumL2TBTCToken({ signerOrProvider: signer }, chainId) + const l2TbtcToken = new ArbitrumL2TBTCToken( + { signerOrProvider: signer }, + chainId + ) return { l2BitcoinDepositor, diff --git a/typescript/src/lib/contracts/chain.ts b/typescript/src/lib/contracts/chain.ts index 4fe6c91a4..38a00ea1b 100644 --- a/typescript/src/lib/contracts/chain.ts +++ b/typescript/src/lib/contracts/chain.ts @@ -61,9 +61,9 @@ export const ChainMappings: ChainMapping[] = [ { ethereum: Chains.Ethereum.Mainnet, arbitrum: Chains.Arbitrum.Arbitrum, - } + }, { ethereum: Chains.Ethereum.Sepolia, arbitrum: Chains.Arbitrum.ArbitrumSepolia, - } + }, ] diff --git a/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json b/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json index cec9cc3d7..3d4267f71 100644 --- a/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json +++ b/typescript/src/lib/ethereum/artifacts/sepolia/ArbitrumL1BitcoinDepositor.json @@ -734,4 +734,4 @@ "numDeployments": 1, "implementation": "0xf90292a39014033DE50c81f651365cB6A1040Bb6", "devdoc": "Contract deployed as upgradable proxy" -} \ No newline at end of file +} diff --git a/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts b/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts index e777e5e06..4d625b99f 100644 --- a/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts +++ b/typescript/src/lib/ethereum/l1-bitcoin-depositor.ts @@ -20,11 +20,9 @@ import { Hex } from "../utils" // 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) => { switch (l2ChainName) { diff --git a/typescript/test/lib/arbitrum.test.ts b/typescript/test/lib/arbitrum.test.ts index 71f755603..be148f642 100644 --- a/typescript/test/lib/arbitrum.test.ts +++ b/typescript/test/lib/arbitrum.test.ts @@ -1,178 +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" - ), + 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", + ]) + }) } - 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( + ) + + context( + "when L2 deposit owner is not properly encoded in the extra data", + () => { + it("should throw", async () => { + await expect( + 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", + ...deposit, + extraData: undefined, // Set empty extra data. }, - "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") - }) - } - ) - }) + vault + ) + ).to.be.rejectedWith("Extra data is required") + }) + } + ) }) - - describe("ArbitrumL2TBTCToken", () => { - let tokenContract: MockContract - let tokenHandle: ArbitrumL2TBTCToken - + }) + + 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 () => { - const [signer] = new MockProvider().getWallets() - - tokenContract = await deployMockContract( - signer, - `${JSON.stringify(ArbitrumL2TBTCTokenABI)}` - ) - - tokenHandle = new ArbitrumL2TBTCToken( - { - address: tokenContract.address, - signerOrProvider: signer, - }, - Chains.Arbitrum.ArbitrumSepolia - ) + await tokenContract.mock.balanceOf.returns(10) + + balance = await tokenHandle.balanceOf(identifier) }) - - 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) - }) + + 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) }) }) }) - \ No newline at end of file +}) diff --git a/typescript/test/services/deposits.test.ts b/typescript/test/services/deposits.test.ts index fa9859c95..4e3ef33a2 100644 --- a/typescript/test/services/deposits.test.ts +++ b/typescript/test/services/deposits.test.ts @@ -2216,7 +2216,9 @@ describe("Deposits", () => { "mjc2zGWypwpNyDi4ZxGbBNnUA84bfgiwYc", "Arbitrum" ) - ).to.be.rejectedWith("Cross-chain contracts for Arbitrum not initialized") + ).to.be.rejectedWith( + "Cross-chain contracts for Arbitrum not initialized" + ) }) }) @@ -2277,9 +2279,7 @@ describe("Deposits", () => { context("when L2 deposit owner can be resolved", () => { beforeEach(async () => { - crossChainContracts.l2BitcoinDepositor.setDepositOwner( - l2DepositOwner - ) + crossChainContracts.l2BitcoinDepositor.setDepositOwner(l2DepositOwner) }) context("when active wallet is not set", () => { @@ -2316,9 +2316,7 @@ describe("Deposits", () => { }) context("when recovery address is correct", () => { - const assertCommonDepositProperties = ( - receipt: DepositReceipt - ) => { + const assertCommonDepositProperties = (receipt: DepositReceipt) => { expect(receipt.depositor).to.be.equal( l1BitcoinDepositor.getChainIdentifier() ) @@ -2393,7 +2391,6 @@ describe("Deposits", () => { }) }) }) -}) describe("DepositRefund", () => { const fee = BigNumber.from(1520) From 64702b89cc4379a8fc4eef95dfbe75821a676037 Mon Sep 17 00:00:00 2001 From: JSanchezFDZ Date: Wed, 17 Jul 2024 12:50:33 +0200 Subject: [PATCH 07/10] [FEAT] Enable crosschain --- typescript/src/services/tbtc.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/typescript/src/services/tbtc.ts b/typescript/src/services/tbtc.ts index e3b7dd05f..8da7df101 100644 --- a/typescript/src/services/tbtc.ts +++ b/typescript/src/services/tbtc.ts @@ -80,15 +80,17 @@ 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 = false): Promise { return TBTC.initializeEthereum( signer, Chains.Ethereum.Mainnet, - BitcoinNetwork.Mainnet + BitcoinNetwork.Mainnet, + crossChainSupport ) } @@ -97,15 +99,17 @@ 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 ) } @@ -235,6 +239,7 @@ export class TBTC { l2Signer, arbitrumChainId ) + break default: throw new Error("Unsupported L2 chain") } From 6b622008440328e6cb279b5f981844952c14bf8f Mon Sep 17 00:00:00 2001 From: JSanchezFDZ Date: Wed, 17 Jul 2024 12:50:43 +0200 Subject: [PATCH 08/10] [FIX] Chains --- typescript/src/lib/contracts/chain.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/typescript/src/lib/contracts/chain.ts b/typescript/src/lib/contracts/chain.ts index 38a00ea1b..fc4772620 100644 --- a/typescript/src/lib/contracts/chain.ts +++ b/typescript/src/lib/contracts/chain.ts @@ -48,22 +48,14 @@ export type ChainMapping = { * List of chain mappings supported by tBTC v2 contracts. */ export const ChainMappings: ChainMapping[] = [ - // Ethereum Mainnet to Base + TESTNETs { ethereum: Chains.Ethereum.Mainnet, base: Chains.Base.Base, - }, - { - ethereum: Chains.Ethereum.Sepolia, - base: Chains.Base.BaseSepolia, - }, - // Ethereum Mainnet to Arbitrum + TESTNETs - { - ethereum: Chains.Ethereum.Mainnet, arbitrum: Chains.Arbitrum.Arbitrum, }, { ethereum: Chains.Ethereum.Sepolia, + base: Chains.Base.BaseSepolia, arbitrum: Chains.Arbitrum.ArbitrumSepolia, - }, + } ] From 8a4a6a916a13cfdd33ea4fe7c29a7c4a799023bb Mon Sep 17 00:00:00 2001 From: JSanchezFDZ Date: Tue, 6 Aug 2024 13:45:42 +0200 Subject: [PATCH 09/10] [DELETE] Modifications on cross-chain folder --- .../ArbitrumL1BitcoinDepositorUpgraded.sol | 15 - .../ArbitrumL2BitcoinDepositorUpgraded.sol | 15 - .../deploy_helpers/wormhole_chains.ts | 32 -- .../ArbitrumL2BitcoinDepositor.json | 429 ------------------ 4 files changed, 491 deletions(-) delete mode 100644 cross-chain/arbitrum/contracts/test/ArbitrumL1BitcoinDepositorUpgraded.sol delete mode 100644 cross-chain/arbitrum/contracts/test/ArbitrumL2BitcoinDepositorUpgraded.sol delete mode 100644 cross-chain/arbitrum/deploy_helpers/wormhole_chains.ts delete mode 100644 cross-chain/arbitrum/deployments/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json diff --git a/cross-chain/arbitrum/contracts/test/ArbitrumL1BitcoinDepositorUpgraded.sol b/cross-chain/arbitrum/contracts/test/ArbitrumL1BitcoinDepositorUpgraded.sol deleted file mode 100644 index 1caa8f1d5..000000000 --- a/cross-chain/arbitrum/contracts/test/ArbitrumL1BitcoinDepositorUpgraded.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.17; - -import "@keep-network/tbtc-v2/contracts/l2/L1BitcoinDepositor.sol"; - -/// @notice L1BitcoinDepositor for Arbitrum - upgraded version. -/// @dev This contract is intended solely for testing purposes. -contract ArbitrumL1BitcoinDepositorUpgraded is L1BitcoinDepositor { - string public newVar; - - function initializeV2(string memory _newVar) public { - newVar = _newVar; - } -} \ No newline at end of file diff --git a/cross-chain/arbitrum/contracts/test/ArbitrumL2BitcoinDepositorUpgraded.sol b/cross-chain/arbitrum/contracts/test/ArbitrumL2BitcoinDepositorUpgraded.sol deleted file mode 100644 index 4a042d59b..000000000 --- a/cross-chain/arbitrum/contracts/test/ArbitrumL2BitcoinDepositorUpgraded.sol +++ /dev/null @@ -1,15 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only - -pragma solidity ^0.8.17; - -import "@keep-network/tbtc-v2/contracts/l2/L2BitcoinDepositor.sol"; - -/// @notice L2BitcoinDepositor for Arbitrum - upgraded version. -/// @dev This contract is intended solely for testing purposes. -contract ArbitrumL2BitcoinDepositorUpgraded is L2BitcoinDepositor { - string public newVar; - - function initializeV2(string memory _newVar) public { - newVar = _newVar; - } -} \ No newline at end of file diff --git a/cross-chain/arbitrum/deploy_helpers/wormhole_chains.ts b/cross-chain/arbitrum/deploy_helpers/wormhole_chains.ts deleted file mode 100644 index 436011f0f..000000000 --- a/cross-chain/arbitrum/deploy_helpers/wormhole_chains.ts +++ /dev/null @@ -1,32 +0,0 @@ -export type WormholeChains = { - l1ChainId: number - l2ChainId: number -} - -/** - * Returns Wormhole L1 and L2 chain IDs for the given network. - * Source: https://docs.wormhole.com/wormhole/reference/constants#chain-ids - * @param network Network name. - */ -export function getWormholeChains(network: string): WormholeChains { - let l1ChainId: number - let l2ChainId: number - - switch (network) { - case "mainnet": - case "arbitrum": - l1ChainId = 2 // L1 Ethereum mainnet - l2ChainId = 23 // L2 Arbitrum mainnet - break - case "sepolia": - case "arbitrumSepolia": - l1ChainId = 10002 // L1 Ethereum Sepolia testnet - l2ChainId = 10003 // L2 Arbitrum Sepolia testnet - break - - default: - throw new Error("Unsupported network") - } - - return { l1ChainId, l2ChainId } -} diff --git a/cross-chain/arbitrum/deployments/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json b/cross-chain/arbitrum/deployments/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json deleted file mode 100644 index 69cc79cd7..000000000 --- a/cross-chain/arbitrum/deployments/arbitrumSepolia/ArbitrumL2BitcoinDepositor.json +++ /dev/null @@ -1,429 +0,0 @@ -{ - "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" -} \ No newline at end of file From 1a370728f75b42d726a07636102cb3d2d132b7b7 Mon Sep 17 00:00:00 2001 From: JSanchezFDZ Date: Tue, 6 Aug 2024 13:46:00 +0200 Subject: [PATCH 10/10] [FIX] Docs + format --- typescript/api-reference/README.md | 135 +++++--- .../classes/ArbitrumL2BitcoinDepositor.md | 307 ++++++++++++++++++ .../classes/ArbitrumL2TBTCToken.md | 213 ++++++++++++ .../classes/BaseL2BitcoinDepositor.md | 26 +- .../api-reference/classes/BaseL2TBTCToken.md | 16 +- .../api-reference/classes/BitcoinTxHash.md | 16 +- .../classes/CrossChainDepositor.md | 14 +- typescript/api-reference/classes/Deposit.md | 22 +- .../api-reference/classes/DepositFunding.md | 10 +- .../api-reference/classes/DepositRefund.md | 16 +- .../api-reference/classes/DepositScript.md | 14 +- .../api-reference/classes/DepositsService.md | 30 +- .../api-reference/classes/ElectrumClient.md | 46 +-- .../api-reference/classes/EthereumAddress.md | 8 +- .../api-reference/classes/EthereumBridge.md | 58 ++-- .../EthereumCrossChainExtraDataEncoder.md | 4 +- .../classes/EthereumDepositorProxy.md | 10 +- .../classes/EthereumL1BitcoinDepositor.md | 22 +- .../classes/EthereumTBTCToken.md | 22 +- .../classes/EthereumTBTCVault.md | 38 +-- .../classes/EthereumWalletRegistry.md | 22 +- typescript/api-reference/classes/Hex.md | 16 +- .../classes/MaintenanceService.md | 6 +- .../classes/OptimisticMinting.md | 12 +- .../classes/RedemptionsService.md | 18 +- typescript/api-reference/classes/Spv.md | 10 +- typescript/api-reference/classes/TBTC.md | 52 +-- typescript/api-reference/classes/WalletTx.md | 6 +- .../api-reference/enums/BitcoinNetwork-1.md | 6 +- .../api-reference/enums/Chains.Arbitrum.md | 30 ++ typescript/api-reference/enums/Chains.Base.md | 4 +- .../api-reference/enums/Chains.Ethereum.md | 6 +- .../api-reference/enums/WalletState-1.md | 12 +- .../api-reference/interfaces/BitcoinClient.md | 24 +- .../api-reference/interfaces/BitcoinHeader.md | 12 +- .../api-reference/interfaces/BitcoinRawTx.md | 2 +- .../interfaces/BitcoinRawTxVectors.md | 8 +- .../interfaces/BitcoinSpvProof.md | 10 +- .../api-reference/interfaces/BitcoinTx.md | 6 +- .../interfaces/BitcoinTxMerkleBranch.md | 6 +- .../interfaces/BitcoinTxOutpoint.md | 4 +- .../interfaces/BitcoinTxOutput.md | 6 +- typescript/api-reference/interfaces/Bridge.md | 34 +- .../api-reference/interfaces/ChainEvent.md | 6 +- .../interfaces/ChainIdentifier.md | 4 +- .../interfaces/CrossChainContractsLoader.md | 8 +- .../interfaces/CrossChainExtraDataEncoder.md | 4 +- .../interfaces/DepositReceipt.md | 12 +- .../interfaces/DepositRequest.md | 12 +- .../interfaces/DepositorProxy.md | 4 +- .../interfaces/ElectrumCredentials.md | 6 +- .../interfaces/EthereumContractConfig.md | 6 +- .../interfaces/GetChainEvents.Function.md | 2 +- .../interfaces/GetChainEvents.Options.md | 10 +- .../interfaces/L1BitcoinDepositor.md | 6 +- .../interfaces/L2BitcoinDepositor.md | 11 +- .../api-reference/interfaces/L2TBTCToken.md | 5 +- .../api-reference/interfaces/RedeemerProxy.md | 4 +- .../interfaces/RedemptionRequest.md | 12 +- .../api-reference/interfaces/TBTCToken.md | 8 +- .../api-reference/interfaces/TBTCVault.md | 24 +- typescript/api-reference/interfaces/Wallet.md | 20 +- .../interfaces/WalletRegistry.md | 10 +- .../api-reference/modules/BitcoinNetwork.md | 2 +- typescript/api-reference/modules/Chains.md | 1 + .../api-reference/modules/WalletState.md | 2 +- typescript/src/lib/contracts/chain.ts | 2 +- typescript/src/services/tbtc.ts | 10 +- 68 files changed, 1063 insertions(+), 467 deletions(-) create mode 100644 typescript/api-reference/classes/ArbitrumL2BitcoinDepositor.md create mode 100644 typescript/api-reference/classes/ArbitrumL2TBTCToken.md create mode 100644 typescript/api-reference/enums/Chains.Arbitrum.md diff --git a/typescript/api-reference/README.md b/typescript/api-reference/README.md index b012fd2b5..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) @@ -122,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) @@ -142,7 +145,7 @@ Data about a Bitcoin transaction input. #### Defined in -[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) ___ @@ -154,7 +157,7 @@ Data about a Bitcoin unspent transaction output. #### Defined in -[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) ___ @@ -168,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 -[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) ___ @@ -186,7 +190,7 @@ between TBTC L1 ledger chain and a specific supported L2/side-chain. #### Defined in -[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) ___ @@ -203,7 +207,7 @@ Mode of operation for the cross-chain depositor proxy: #### Defined in -[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) ___ @@ -215,7 +219,7 @@ Represents an event emitted on deposit reveal to the on-chain bridge. #### Defined in -[lib/contracts/bridge.ts:307](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L307) +[lib/contracts/bridge.ts:307](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L307) ___ @@ -228,7 +232,7 @@ wallet registry. #### Defined in -[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) ___ @@ -241,7 +245,7 @@ wallet registry. #### Defined in -[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) ___ @@ -254,7 +258,7 @@ wallet registry. #### Defined in -[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) ___ @@ -266,7 +270,7 @@ Additional options used by the Electrum server. #### Defined in -[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) ___ @@ -292,7 +296,7 @@ True if the error matches, false otherwise. #### Defined in -[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) ___ @@ -306,7 +310,7 @@ or a Provider that works only in the read-only mode. #### Defined in -[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) ___ @@ -332,7 +336,7 @@ A function that is called with execution status messages. #### Defined in -[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) ___ @@ -350,7 +354,7 @@ Aggregates L1-specific TBTC cross-chain contracts. #### Defined in -[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) ___ @@ -362,7 +366,7 @@ Layer 2 chains supported by tBTC v2 contracts. #### Defined in -[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) ___ @@ -381,7 +385,7 @@ Aggregates L2-specific TBTC cross-chain contracts. #### Defined in -[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) ___ @@ -393,7 +397,7 @@ Represents an event emitted when new wallet is registered on the on-chain bridge #### Defined in -[lib/contracts/bridge.ts:471](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L471) +[lib/contracts/bridge.ts:471](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L471) ___ @@ -406,7 +410,7 @@ is cancelled on chain. #### Defined in -[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) ___ @@ -419,7 +423,7 @@ is finalized on chain. #### Defined in -[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) ___ @@ -439,7 +443,7 @@ Bridge. #### Defined in -[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) ___ @@ -452,7 +456,7 @@ on chain. #### Defined in -[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) ___ @@ -464,7 +468,7 @@ Represents an event emitted on redemption request. #### Defined in -[lib/contracts/bridge.ts:358](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L358) +[lib/contracts/bridge.ts:358](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L358) ___ @@ -494,7 +498,7 @@ ___ #### Defined in -[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) ___ @@ -515,7 +519,7 @@ Convenience type aggregating all TBTC core contracts. #### Defined in -[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 @@ -537,7 +541,7 @@ Utility functions allowing to perform Bitcoin address conversions. #### Defined in -[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) ___ @@ -555,7 +559,7 @@ Utility functions allowing to deal with Bitcoin compact size uints. #### Defined in -[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) ___ @@ -576,7 +580,7 @@ Utility functions allowing to deal with Bitcoin hashes. #### Defined in -[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) ___ @@ -596,7 +600,7 @@ Utility functions allowing to serialize and deserialize Bitcoin block headers. #### Defined in -[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) ___ @@ -615,7 +619,7 @@ Utility functions allowing to deal with Bitcoin locktime. #### Defined in -[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) ___ @@ -633,7 +637,7 @@ Utility functions allowing to perform operations on Bitcoin ECDSA private keys. #### Defined in -[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) ___ @@ -652,7 +656,7 @@ Utility functions allowing to perform operations on Bitcoin ECDSA public keys. #### Defined in -[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) ___ @@ -673,7 +677,7 @@ Utility functions allowing to deal with Bitcoin scripts. #### Defined in -[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) ___ @@ -692,7 +696,7 @@ Utility functions allowing to perform Bitcoin target conversions. #### Defined in -[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) ___ @@ -704,7 +708,7 @@ List of chain mappings supported by tBTC v2 contracts. #### Defined in -[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 @@ -731,7 +735,7 @@ Bitcoin transaction along with the inclusion proof. #### Defined in -[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) ___ @@ -781,7 +785,7 @@ A function that can retry any function. #### Defined in -[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) ___ @@ -805,7 +809,7 @@ Chain ID as a string. #### Defined in -[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) ___ @@ -830,7 +834,7 @@ Electrum script hash as a hex string. #### Defined in -[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) ___ @@ -860,7 +864,7 @@ Throws an error if the address of the signer is not a proper #### Defined in -[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) ___ @@ -893,7 +897,7 @@ Throws an error if the signer's Ethereum chain ID is other than #### Defined in -[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) ___ @@ -918,7 +922,38 @@ Transaction data with fields represented as un-prefixed hex strings. #### Defined in -[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) ___ @@ -949,7 +984,7 @@ Throws an error if the signer's Base chain ID is other than #### Defined in -[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) ___ @@ -980,7 +1015,7 @@ Throws an error if the signer's Ethereum chain ID is other than #### Defined in -[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) ___ @@ -1024,7 +1059,7 @@ Packed parameters. #### Defined in -[lib/ethereum/bridge.ts:714](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L714) +[lib/ethereum/bridge.ts:714](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L714) ___ @@ -1049,7 +1084,7 @@ Always returns true. #### Defined in -[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) ___ @@ -1075,7 +1110,7 @@ Matcher function that returns false if error matches one of the patterns. #### Defined in -[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) ___ @@ -1104,7 +1139,7 @@ An error if the network is not supported by `bitcoinjs-lib`. #### Defined in -[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) ___ @@ -1145,7 +1180,7 @@ If any of the block headers are invalid, or if the block #### Defined in -[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) ___ @@ -1185,7 +1220,7 @@ The function should be used within a try-catch block. #### Defined in -[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) ___ @@ -1212,4 +1247,4 @@ This function does not validate the depositor's identifier as its #### Defined in -[lib/contracts/bridge.ts:247](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L247) +[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 9a5d3c22d..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 51a4548e2..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 47deeb331..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 bf56ad21a..e2bc223ac 100644 --- a/typescript/api-reference/classes/CrossChainDepositor.md +++ b/typescript/api-reference/classes/CrossChainDepositor.md @@ -49,7 +49,7 @@ for reference. #### Defined in -[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 -[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 -[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 -[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 -[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 -[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 -[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 c199e6f42..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 7bf298e41..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 -[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 -[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 -[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 -[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 -[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 1bc726de0..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 3a371eeb6..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 e04745ecb..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 b75cebaea..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 7998fc4a6..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 -[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 -[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 -[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 -[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 2cf5f17af..0091c5c00 100644 --- a/typescript/api-reference/classes/EthereumBridge.md +++ b/typescript/api-reference/classes/EthereumBridge.md @@ -79,7 +79,7 @@ EthersContractHandle\<BridgeTypechain\>.constructor #### Defined in -[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 @@ -97,7 +97,7 @@ EthersContractHandle.\_deployedAtBlockNumber #### Defined in -[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) ___ @@ -113,7 +113,7 @@ EthersContractHandle.\_instance #### Defined in -[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) ___ @@ -129,7 +129,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[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 @@ -149,7 +149,7 @@ EthersContractHandle.\_totalRetryAttempts #### Defined in -[lib/ethereum/bridge.ts:509](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L509) +[lib/ethereum/bridge.ts:509](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L509) ___ @@ -178,7 +178,7 @@ Builds the UTXO hash based on the UTXO components. UTXO hash is computed as #### Defined in -[lib/ethereum/bridge.ts:644](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L644) +[lib/ethereum/bridge.ts:644](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L644) ___ @@ -205,7 +205,7 @@ ___ #### Defined in -[lib/ethereum/bridge.ts:444](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L444) +[lib/ethereum/bridge.ts:444](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L444) ___ @@ -227,7 +227,7 @@ EthersContractHandle.getAddress #### Defined in -[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) ___ @@ -247,7 +247,7 @@ ___ #### Defined in -[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) ___ @@ -274,7 +274,7 @@ Bridge.getDepositRevealedEvents #### Defined in -[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) ___ @@ -308,7 +308,7 @@ EthersContractHandle.getEvents #### Defined in -[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) ___ @@ -335,7 +335,7 @@ Bridge.getNewWalletRegisteredEvents #### Defined in -[lib/ethereum/bridge.ts:556](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L556) +[lib/ethereum/bridge.ts:556](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L556) ___ @@ -362,7 +362,7 @@ Bridge.getRedemptionRequestedEvents #### Defined in -[lib/ethereum/bridge.ts:661](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L661) +[lib/ethereum/bridge.ts:661](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L661) ___ @@ -382,7 +382,7 @@ ___ #### Defined in -[lib/ethereum/bridge.ts:530](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L530) +[lib/ethereum/bridge.ts:530](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L530) ___ @@ -406,7 +406,7 @@ Parsed deposit request. #### Defined in -[lib/ethereum/bridge.ts:489](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L489) +[lib/ethereum/bridge.ts:489](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L489) ___ @@ -431,7 +431,7 @@ Parsed redemption request. #### Defined in -[lib/ethereum/bridge.ts:228](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L228) +[lib/ethereum/bridge.ts:228](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L228) ___ @@ -455,7 +455,7 @@ Parsed wallet data. #### Defined in -[lib/ethereum/bridge.ts:615](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L615) +[lib/ethereum/bridge.ts:615](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L615) ___ @@ -482,7 +482,7 @@ ___ #### Defined in -[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) ___ @@ -509,7 +509,7 @@ ___ #### Defined in -[lib/ethereum/bridge.ts:147](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L147) +[lib/ethereum/bridge.ts:147](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L147) ___ @@ -538,7 +538,7 @@ ___ #### Defined in -[lib/ethereum/bridge.ts:349](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L349) +[lib/ethereum/bridge.ts:349](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L349) ___ @@ -567,7 +567,7 @@ ___ #### Defined in -[lib/ethereum/bridge.ts:246](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L246) +[lib/ethereum/bridge.ts:246](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L246) ___ @@ -596,7 +596,7 @@ ___ #### Defined in -[lib/ethereum/bridge.ts:283](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L283) +[lib/ethereum/bridge.ts:283](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L283) ___ @@ -625,7 +625,7 @@ ___ #### Defined in -[lib/ethereum/bridge.ts:393](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L393) +[lib/ethereum/bridge.ts:393](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L393) ___ @@ -652,7 +652,7 @@ ___ #### Defined in -[lib/ethereum/bridge.ts:170](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L170) +[lib/ethereum/bridge.ts:170](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L170) ___ @@ -672,7 +672,7 @@ ___ #### Defined in -[lib/ethereum/bridge.ts:335](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L335) +[lib/ethereum/bridge.ts:335](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L335) ___ @@ -692,7 +692,7 @@ ___ #### Defined in -[lib/ethereum/bridge.ts:581](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L581) +[lib/ethereum/bridge.ts:581](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L581) ___ @@ -718,7 +718,7 @@ ___ #### Defined in -[lib/ethereum/bridge.ts:598](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L598) +[lib/ethereum/bridge.ts:598](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L598) ___ @@ -743,7 +743,7 @@ Deposit key. #### Defined in -[lib/ethereum/bridge.ts:470](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L470) +[lib/ethereum/bridge.ts:470](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/ethereum/bridge.ts#L470) ___ @@ -768,4 +768,4 @@ The redemption key. #### Defined in -[lib/ethereum/bridge.ts:198](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/ethereum/bridge.ts#L198) +[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 443d0612c..c84df3178 100644 --- a/typescript/api-reference/classes/EthereumCrossChainExtraDataEncoder.md +++ b/typescript/api-reference/classes/EthereumCrossChainExtraDataEncoder.md @@ -55,7 +55,7 @@ for reference. #### Defined in -[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 -[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 1c5a59cd4..6d1075f67 100644 --- a/typescript/api-reference/classes/EthereumDepositorProxy.md +++ b/typescript/api-reference/classes/EthereumDepositorProxy.md @@ -46,7 +46,7 @@ for reference. #### Defined in -[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 -[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 -[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 -[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 -[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 5c160b912..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 c36075428..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 e86d19d65..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 d32a85209..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 9975b5248..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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/MaintenanceService.md b/typescript/api-reference/classes/MaintenanceService.md index 22efdffb5..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 -[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 -[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 -[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 4c5fe6b04..bd22708a0 100644 --- a/typescript/api-reference/classes/OptimisticMinting.md +++ b/typescript/api-reference/classes/OptimisticMinting.md @@ -35,7 +35,7 @@ #### Defined in -[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 -[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 -[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 -[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 -[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 -[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 744665770..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 2fdf8ae10..9dfe07ca9 100644 --- a/typescript/api-reference/classes/Spv.md +++ b/typescript/api-reference/classes/Spv.md @@ -35,7 +35,7 @@ #### Defined in -[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 -[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 -[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 -[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 -[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 6404d7506..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 f3371bf4f..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 -[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 -[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 -[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 0b7b11044..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 -[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 -[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 -[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 fd677d9ca..0a2d6391c 100644 --- a/typescript/api-reference/enums/Chains.Base.md +++ b/typescript/api-reference/enums/Chains.Base.md @@ -17,7 +17,7 @@ #### Defined in -[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 -[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 af63ef2f3..37817641b 100644 --- a/typescript/api-reference/enums/Chains.Ethereum.md +++ b/typescript/api-reference/enums/Chains.Ethereum.md @@ -18,7 +18,7 @@ #### Defined in -[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 -[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 -[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 c76765f83..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 -[lib/contracts/bridge.ts:395](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L395) +[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 -[lib/contracts/bridge.ts:390](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L390) +[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 -[lib/contracts/bridge.ts:377](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L377) +[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 -[lib/contracts/bridge.ts:384](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L384) +[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 -[lib/contracts/bridge.ts:402](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L402) +[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 -[lib/contracts/bridge.ts:373](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L373) +[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 bc76bc8b1..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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 731675c74..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 -[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 -[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 -[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 -[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 -[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 -[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 f1b4f45b1..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 -[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 a541515d1..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 -[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 -[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 -[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 -[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 2bacc243f..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 -[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 -[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 -[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 -[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 -[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 aad847f53..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 -[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 -[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 -[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 9a28390f9..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 -[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 -[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 -[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 e6bff27c7..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 -[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 -[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 d364b1206..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 -[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 -[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 -[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 e7b2c92b9..55ca6b55c 100644 --- a/typescript/api-reference/interfaces/Bridge.md +++ b/typescript/api-reference/interfaces/Bridge.md @@ -45,7 +45,7 @@ GetEventsFunction #### Defined in -[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) ___ @@ -61,7 +61,7 @@ GetEventsFunction #### Defined in -[lib/contracts/bridge.ts:169](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L169) +[lib/contracts/bridge.ts:169](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L169) ___ @@ -77,7 +77,7 @@ GetEventsFunction #### Defined in -[lib/contracts/bridge.ts:195](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L195) +[lib/contracts/bridge.ts:195](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L195) ## Methods @@ -97,7 +97,7 @@ Compressed (33 bytes long with 02 or 03 prefix) active wallet's #### Defined in -[lib/contracts/bridge.ts:163](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L163) +[lib/contracts/bridge.ts:163](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L163) ___ @@ -121,7 +121,7 @@ The hash of the UTXO. #### Defined in -[lib/contracts/bridge.ts:189](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L189) +[lib/contracts/bridge.ts:189](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L189) ___ @@ -146,7 +146,7 @@ Revealed deposit data. #### Defined in -[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) ___ @@ -162,7 +162,7 @@ Gets the chain-specific identifier of this contract. #### Defined in -[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) ___ @@ -187,7 +187,7 @@ Promise with the pending redemption. #### Defined in -[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) ___ @@ -213,7 +213,7 @@ Promise with the pending redemption. #### Defined in -[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:138](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L138) ___ @@ -240,7 +240,7 @@ Transaction hash of the request redemption transaction. #### Defined in -[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) ___ @@ -267,7 +267,7 @@ Transaction hash of the reveal deposit transaction. #### Defined in -[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) ___ @@ -294,7 +294,7 @@ Transaction hash of the submit deposit sweep proof transaction. #### Defined in -[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) ___ @@ -321,7 +321,7 @@ Transaction hash of the submit redemption proof transaction. #### Defined in -[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) ___ @@ -346,7 +346,7 @@ Promise with the pending redemption. #### Defined in -[lib/contracts/bridge.ts:152](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L152) +[lib/contracts/bridge.ts:152](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L152) ___ @@ -369,7 +369,7 @@ This number signifies how many confirmations a transaction has to #### Defined in -[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) ___ @@ -385,7 +385,7 @@ Returns the attached WalletRegistry instance. #### Defined in -[lib/contracts/bridge.ts:174](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L174) +[lib/contracts/bridge.ts:174](https://github.com/Unknown-Gravity/tbtc-v2-sdk/blob/main/typescript/src/lib/contracts/bridge.ts#L174) ___ @@ -409,4 +409,4 @@ Promise with the wallet details. #### Defined in -[lib/contracts/bridge.ts:182](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L182) +[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 afc8f0b7a..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 -[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 -[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 -[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 a5a08597a..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 -[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 -[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 b817b7bfd..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 -[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 -[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 dbcb9058f..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 -[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 -[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 c551bfcd6..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 -[lib/contracts/bridge.ts:212](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L212) +[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 -[lib/contracts/bridge.ts:206](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L206) +[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 -[lib/contracts/bridge.ts:237](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L237) +[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 -[lib/contracts/bridge.ts:232](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L232) +[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 -[lib/contracts/bridge.ts:227](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L227) +[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 -[lib/contracts/bridge.ts:219](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L219) +[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 fc69d003d..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 -[lib/contracts/bridge.ts:281](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L281) +[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 -[lib/contracts/bridge.ts:276](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L276) +[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 -[lib/contracts/bridge.ts:291](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L291) +[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 -[lib/contracts/bridge.ts:296](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L296) +[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 -[lib/contracts/bridge.ts:301](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L301) +[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 -[lib/contracts/bridge.ts:286](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L286) +[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 977c03149..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 -[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 -[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 d15fbaa59..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 -[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 -[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 -[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 49b8d1b50..78a822c0f 100644 --- a/typescript/api-reference/interfaces/EthereumContractConfig.md +++ b/typescript/api-reference/interfaces/EthereumContractConfig.md @@ -22,7 +22,7 @@ contract artifact. #### Defined in -[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 -[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 -[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 10c90d30d..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 -[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 eb17d6ac7..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 -[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 -[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 -[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 -[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 -[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 157be74b6..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 -[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 -[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 -[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 660fc4f19..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 -[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 -[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 -[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 -[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 -[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 be075cd56..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 -[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 -[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 ca8476277..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 -[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 -[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 131cc1306..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 -[lib/contracts/bridge.ts:320](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L320) +[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 -[lib/contracts/bridge.ts:326](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L326) +[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 -[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: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 -[lib/contracts/bridge.ts:352](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L352) +[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 -[lib/contracts/bridge.ts:341](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L341) +[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 -[lib/contracts/bridge.ts:347](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L347) +[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 a8fbda001..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 -[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 -[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 -[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 -[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 c7bead2a0..2241ffe3b 100644 --- a/typescript/api-reference/interfaces/TBTCVault.md +++ b/typescript/api-reference/interfaces/TBTCVault.md @@ -40,7 +40,7 @@ GetEventsFunction #### Defined in -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 -[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 939f04c88..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 -[lib/contracts/bridge.ts:453](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L453) +[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 -[lib/contracts/bridge.ts:444](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L444) +[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 -[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: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 -[lib/contracts/bridge.ts:436](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L436) +[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 -[lib/contracts/bridge.ts:449](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L449) +[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 -[lib/contracts/bridge.ts:465](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L465) +[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 -[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: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 -[lib/contracts/bridge.ts:440](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L440) +[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 -[lib/contracts/bridge.ts:461](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L461) +[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 -[lib/contracts/bridge.ts:432](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L432) +[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 2fb0500fc..332c57a6b 100644 --- a/typescript/api-reference/interfaces/WalletRegistry.md +++ b/typescript/api-reference/interfaces/WalletRegistry.md @@ -33,7 +33,7 @@ GetEventsFunction #### Defined in -[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 -[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 -[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 -[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 -[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 369c84e00..ff9bab99b 100644 --- a/typescript/api-reference/modules/BitcoinNetwork.md +++ b/typescript/api-reference/modules/BitcoinNetwork.md @@ -30,4 +30,4 @@ Bitcoin Network. #### Defined in -[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 81a171ca5..fd8b5d284 100644 --- a/typescript/api-reference/modules/WalletState.md +++ b/typescript/api-reference/modules/WalletState.md @@ -24,4 +24,4 @@ #### Defined in -[lib/contracts/bridge.ts:408](https://github.com/keep-network/tbtc-v2/blob/main/typescript/src/lib/contracts/bridge.ts#L408) +[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/src/lib/contracts/chain.ts b/typescript/src/lib/contracts/chain.ts index fc4772620..c02f7e822 100644 --- a/typescript/src/lib/contracts/chain.ts +++ b/typescript/src/lib/contracts/chain.ts @@ -57,5 +57,5 @@ export const ChainMappings: ChainMapping[] = [ ethereum: Chains.Ethereum.Sepolia, base: Chains.Base.BaseSepolia, arbitrum: Chains.Arbitrum.ArbitrumSepolia, - } + }, ] diff --git a/typescript/src/services/tbtc.ts b/typescript/src/services/tbtc.ts index 8da7df101..a2a73aaa7 100644 --- a/typescript/src/services/tbtc.ts +++ b/typescript/src/services/tbtc.ts @@ -85,7 +85,10 @@ export class TBTC { * @throws Throws an error if the signer's Ethereum network is other than * Ethereum mainnet. */ - static async initializeMainnet(signer: EthereumSigner, crossChainSupport = false): Promise { + static async initializeMainnet( + signer: EthereumSigner, + crossChainSupport: boolean = false + ): Promise { return TBTC.initializeEthereum( signer, Chains.Ethereum.Mainnet, @@ -104,7 +107,10 @@ export class TBTC { * @throws Throws an error if the signer's Ethereum network is other than * Ethereum mainnet. */ - static async initializeSepolia(signer: EthereumSigner, crossChainSupport:boolean = false): Promise { + static async initializeSepolia( + signer: EthereumSigner, + crossChainSupport: boolean = false + ): Promise { return TBTC.initializeEthereum( signer, Chains.Ethereum.Sepolia,