-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,41 @@ | ||
/** | ||
* The **chain** ID. | ||
* Is used for signing, so transactions can't be replayed on other chains. | ||
*/ | ||
export enum ChainID { | ||
Testnet = 0x80000000, | ||
Mainnet = 0x00000001, | ||
} | ||
|
||
/** | ||
* The **transaction** version. | ||
* Is used for signing, so transactions can't be replayed on other networks. | ||
*/ | ||
export enum TransactionVersion { | ||
Mainnet = 0x00, | ||
Testnet = 0x80, | ||
} | ||
|
||
/** | ||
* @ignore | ||
* The **peer** network ID. | ||
* Typically not used in signing, but used for broadcasting to the P2P network. | ||
* It can also be used to determine the parent of a subnet. | ||
* | ||
* Attention: | ||
* For mainnet/testnet the v2/info response `.network_id` refers to the chain ID | ||
* For subnets the v2/info response `.network_id` refers to the peer network ID and the chain ID (they are the same for subnets) | ||
* The `.parent_network_id` refers to the actual peer network ID (of the parent) in both cases | ||
*/ | ||
export enum PeerNetworkID { | ||
Mainnet = 0x17000000, | ||
Testnet = 0xff000000, | ||
} | ||
|
||
/** @ignore internal */ | ||
export const PRIVATE_KEY_COMPRESSED_LENGTH = 33; | ||
|
||
/** | ||
* @ignore | ||
*/ | ||
/** @ignore internal */ | ||
export const PRIVATE_KEY_UNCOMPRESSED_LENGTH = 32; | ||
|
||
/** | ||
* @ignore | ||
*/ | ||
/** @ignore internal */ | ||
export const BLOCKSTACK_DEFAULT_GAIA_HUB_URL = 'https://hub.blockstack.org'; |