@skip-go/client 0.9.2 → 0.9.3

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.
Files changed (2) hide show
  1. package/dist/index.js +57 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -394,15 +394,63 @@ var CELESTIA_CHAIN = {
394
394
  }
395
395
  ]
396
396
  };
397
+ var SOLANA_CHAIN = {
398
+ chain_name: "solana",
399
+ chain_id: "solana",
400
+ pretty_name: "Solana",
401
+ network_type: "mainnet",
402
+ website: "https://solana.com",
403
+ bech32_prefix: "",
404
+ daemon_name: "",
405
+ // Not applicable for Solana
406
+ node_home: "",
407
+ // Not applicable for Solana
408
+ codebase: {
409
+ git_repo: "https://github.com/solana-labs/solana"
410
+ },
411
+ logo_URIs: {
412
+ png: "https://raw.githubusercontent.com/cosmostation/chainlist/main/chain/solana/asset/sol.png"
413
+ },
414
+ apis: {
415
+ rpc: [
416
+ {
417
+ address: "https://api.mainnet-beta.solana.com",
418
+ provider: "Solana Foundation"
419
+ },
420
+ {
421
+ address: "https://mainnet.helius-rpc.com/?api-key=6cadbc95-3333-488f-a187-21ffd0c5fef3",
422
+ provider: "Helius"
423
+ }
424
+ ]
425
+ },
426
+ explorers: [
427
+ {
428
+ kind: "blockchain",
429
+ url: "https://explorer.solana.com",
430
+ tx_page: "https://explorer.solana.com/tx/${txHash}",
431
+ account_page: "https://explorer.solana.com/address/${accountAddress}"
432
+ },
433
+ {
434
+ kind: "Solscan",
435
+ url: "https://solscan.io",
436
+ tx_page: "https://solscan.io/tx/${txHash}",
437
+ account_page: "https://solscan.io/account/${accountAddress}"
438
+ }
439
+ ],
440
+ images: [
441
+ {
442
+ png: "https://raw.githubusercontent.com/cosmostation/chainlist/main/chain/solana/asset/sol.png"
443
+ }
444
+ ]
445
+ };
397
446
  function chains3() {
398
- const chains4 = chainRegistry__namespace.chains;
399
- if (chains4.findIndex((chain) => chain.chain_id === "dydx-mainnet-1") === -1) {
400
- chains4.push(DYDX_CHAIN);
401
- }
402
- if (chains4.findIndex((chain) => chain.chain_id === "celestia") === -1) {
403
- chains4.push(CELESTIA_CHAIN);
404
- }
405
- return chains4;
447
+ const registryChains = chainRegistry__namespace.chains;
448
+ const additionalChains = [DYDX_CHAIN, CELESTIA_CHAIN, SOLANA_CHAIN];
449
+ const existingChainIds = new Set(registryChains.map((chain) => chain.chain_id));
450
+ const newChains = additionalChains.filter(
451
+ (chain) => !existingChainIds.has(chain.chain_id)
452
+ );
453
+ return [...registryChains, ...newChains];
406
454
  }
407
455
  function initiaChains() {
408
456
  const chains4 = initiaRegistry__namespace.chains;
@@ -4001,6 +4049,7 @@ var SkipClient = class {
4001
4049
  return endpointOptions.rpc;
4002
4050
  }
4003
4051
  }
4052
+ console.warn("Warning: You are using unreliable public endpoints. We strongly reccomend overriding them via endpointOptions for use beyond development settings.");
4004
4053
  let chain;
4005
4054
  chain = chains3().find((chain2) => chain2.chain_id === chainID);
4006
4055
  if (!chain) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@skip-go/client",
3
3
  "description": "JavaScript SDK for Skip Go API",
4
- "version": "0.9.2",
4
+ "version": "0.9.3",
5
5
  "repository": "https://github.com/skip-mev/skip-go",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",