@b3dotfun/sdk 0.0.1-alpha.6 → 0.0.1-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -267,6 +267,9 @@ function getPaymentUrl(address, amount, currency) {
267
267
  return `ethereum:${address}`;
268
268
  }
269
269
  function getExplorerTxUrl(chainId, txHash) {
270
+ if (chainId === chains_1.b3.id) {
271
+ return "https://explorer.b3.fun/b3/tx/" + txHash;
272
+ }
270
273
  if (exports.EVM_CHAINS[chainId]) {
271
274
  return exports.EVM_CHAINS[chainId].viem.blockExplorers?.default.url + "/tx/" + txHash;
272
275
  }
@@ -6,6 +6,7 @@ exports.getExplorerUrl = getExplorerUrl;
6
6
  exports.getAddressExplorerUrl = getAddressExplorerUrl;
7
7
  exports.getTokenExplorerUrl = getTokenExplorerUrl;
8
8
  const supported_1 = require("../../shared/constants/chains/supported");
9
+ const chains_1 = require("viem/chains");
9
10
  const baseChainBaseUrl = "https://basescan.org";
10
11
  function getChainById(id) {
11
12
  return Object.values(supported_1.supportedChains).find(chain => chain.id === id);
@@ -15,6 +16,9 @@ function chainIdToName(id) {
15
16
  return name === "Base Mainnet" ? "Base" : name === "The Open Network" ? "Open Network" : name;
16
17
  }
17
18
  function getExplorerUrl(chain, txHash) {
19
+ if (chain.id === chains_1.b3.id) {
20
+ return "https://explorer.b3.fun/b3/tx/" + txHash;
21
+ }
18
22
  let baseUrl = chain.blockExplorers?.default.url;
19
23
  if (chain.id === 8453) {
20
24
  baseUrl = baseChainBaseUrl;
@@ -244,6 +244,9 @@ export function getPaymentUrl(address, amount, currency) {
244
244
  return `ethereum:${address}`;
245
245
  }
246
246
  export function getExplorerTxUrl(chainId, txHash) {
247
+ if (chainId === b3.id) {
248
+ return "https://explorer.b3.fun/b3/tx/" + txHash;
249
+ }
247
250
  if (EVM_CHAINS[chainId]) {
248
251
  return EVM_CHAINS[chainId].viem.blockExplorers?.default.url + "/tx/" + txHash;
249
252
  }
@@ -1,4 +1,5 @@
1
1
  import { supportedChains } from "../../shared/constants/chains/supported";
2
+ import { b3 } from "viem/chains";
2
3
  const baseChainBaseUrl = "https://basescan.org";
3
4
  export function getChainById(id) {
4
5
  return Object.values(supportedChains).find(chain => chain.id === id);
@@ -8,6 +9,9 @@ export function chainIdToName(id) {
8
9
  return name === "Base Mainnet" ? "Base" : name === "The Open Network" ? "Open Network" : name;
9
10
  }
10
11
  export function getExplorerUrl(chain, txHash) {
12
+ if (chain.id === b3.id) {
13
+ return "https://explorer.b3.fun/b3/tx/" + txHash;
14
+ }
11
15
  let baseUrl = chain.blockExplorers?.default.url;
12
16
  if (chain.id === 8453) {
13
17
  baseUrl = baseChainBaseUrl;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@b3dotfun/sdk",
3
- "version": "0.0.1-alpha.6",
3
+ "version": "0.0.1-alpha.7",
4
4
  "source": "src/index.ts",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "react-native": "./dist/cjs/index.native.js",
@@ -255,7 +255,6 @@
255
255
  }
256
256
  },
257
257
  "peerDependencies": {
258
- "@privy-io/react-auth": "*",
259
258
  "@react-three/postprocessing": "2.16.6",
260
259
  "@readyplayerme/visage": "6.10.0",
261
260
  "@tanstack/react-query": "5.55.0",
@@ -311,6 +311,9 @@ export function getPaymentUrl(address: string, amount: bigint, currency: string)
311
311
  }
312
312
 
313
313
  export function getExplorerTxUrl(chainId: number, txHash: string) {
314
+ if (chainId === b3.id) {
315
+ return "https://explorer.b3.fun/b3/tx/" + txHash;
316
+ }
314
317
  if (EVM_CHAINS[chainId]) {
315
318
  return EVM_CHAINS[chainId].viem.blockExplorers?.default.url + "/tx/" + txHash;
316
319
  }
@@ -1,5 +1,5 @@
1
1
  import { supportedChains } from "@b3dotfun/sdk/shared/constants/chains/supported";
2
- import { Chain } from "viem/chains";
2
+ import { b3, Chain } from "viem/chains";
3
3
 
4
4
  const baseChainBaseUrl = "https://basescan.org";
5
5
 
@@ -13,6 +13,9 @@ export function chainIdToName(id: number) {
13
13
  }
14
14
 
15
15
  export function getExplorerUrl(chain: Chain, txHash: string): string {
16
+ if (chain.id === b3.id) {
17
+ return "https://explorer.b3.fun/b3/tx/" + txHash;
18
+ }
16
19
  let baseUrl = chain.blockExplorers?.default.url;
17
20
  if (chain.id === 8453) {
18
21
  baseUrl = baseChainBaseUrl;