-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: implements bitcoin signet support in example dapp * feat: implements bitcoin signet in example wallet * fix: prettier * fix: adds tiny-secp256k1 to packages * chore: cleanup console logs * chore: cleanup * chore: rm console log * chore: dapp rework with btc specs * chore: parse addreses result * chore: sets bifrost wallet link * feat: lists all addresses on getaccountAddresses response * feat: implements new btc spec * feat: adds ordninals address handling * feat: sets addresses in session props * fix: types * refactor: cleanup * fix: build * feat: added btc mainnet * fix: explorer mainnet & testnet urls --------- Co-authored-by: Gancho Radkov <[email protected]>
- Loading branch information
1 parent
ad24028
commit 59487b2
Showing
37 changed files
with
1,896 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { NamespaceMetadata, ChainMetadata, ChainsMap } from "../helpers"; | ||
|
||
export const BIP122_MAINNET = "000000000019d6689c085ae165831e93"; | ||
export const BIP122_TESTNET = "000000000933ea01ad0ee984209779ba"; | ||
|
||
export const BtcChainData: ChainsMap = { | ||
[BIP122_MAINNET]: { | ||
id: `bip122:${BIP122_MAINNET}`, | ||
name: "BTC Mainnet", | ||
rpc: [], | ||
slip44: 0, | ||
testnet: false, | ||
}, | ||
[BIP122_TESTNET]: { | ||
id: `bip122:${BIP122_TESTNET}`, | ||
name: "BTC Testnet", | ||
rpc: [], | ||
slip44: 501, | ||
testnet: true, | ||
}, | ||
}; | ||
|
||
export const BtcMetadata: NamespaceMetadata = { | ||
[BIP122_MAINNET]: { | ||
logo: "/assets/btc-testnet.png", | ||
rgb: "247, 147, 25", | ||
}, | ||
[BIP122_TESTNET]: { | ||
logo: "/assets/btc-testnet.png", | ||
rgb: "247, 147, 25", | ||
}, | ||
}; | ||
|
||
export function getChainMetadata(chainId: string): ChainMetadata { | ||
const reference = chainId.split(":")[1]; | ||
const metadata = BtcMetadata[reference]; | ||
if (typeof metadata === "undefined") { | ||
throw new Error(`No chain metadata found for chainId: ${chainId}`); | ||
} | ||
return metadata; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.