-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from portto/develop
Release 0.4.1
- Loading branch information
Showing
7 changed files
with
188 additions
and
35 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,6 +1,6 @@ | ||
{ | ||
"name": "@blocto/sdk", | ||
"version": "0.4.0", | ||
"version": "0.4.1-beta.2", | ||
"author": "Yang Lin", | ||
"license": "MIT", | ||
"repository": "[email protected]:portto/blocto-sdk.git", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export interface EvmSupportMapping { | ||
[id: string | number]: { | ||
chain_id: number | ||
name: string // backend defined chain name: ethereum, bsc, … | ||
display_name: string // human readable name: Ethereum, Polygon, … | ||
network_type: string // chain network type: mainnet / testnet / devnet | ||
blocto_service_environment: string // backend service env: prod / dev (may return staging in future) | ||
rpc_endpoint_domains: string[] // rpc endpoints whitelist | ||
} | ||
} | ||
|
||
export async function getEvmSupport(): Promise<EvmSupportMapping> { | ||
const { networks } = await fetch('https://api.blocto.app/networks/evm').then(response => response.json()); | ||
const evmSupportMap = networks.reduce((a: any, v: any) => ({ ...a, [v.chain_id]: v }), {}); | ||
return evmSupportMap; | ||
} |
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 @@ | ||
export const isEmail = (value: string) => /\S+@\S+\.\S+/.test(value); |
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