stellar / js-stellar-base

The lowest-level stellar helper library. It consists of classes to read, write, hash, and sign Stellar xdr
https://stellar.github.io/js-stellar-base/
Apache License 2.0
108 stars 137 forks source link

Add FUTURENET networkPassphrase #639

Closed esteblock closed 1 year ago

esteblock commented 1 year ago

Hello, I am supporting the @soroban-react library, and for the @soroban-react/chains package I would like to do

import * as SorobanClient from "soroban-client";
export const futurenet : WalletChain = 
  {
    id: "public",
    name: "Futurenet",
    networkPassphrase: SorobanClient.Networks.FUTURENET,
  }

However SorobanClient.Networks.FUTURENET does not exist here https://github.com/stellar/js-stellar-base/blob/afaacb5d2c3cc34cd555273791837a2f141ce5a3/types/index.d.ts#L220

I think it would be good to add it as Futurenet is important for Soroban development

Shaptic commented 1 year ago

Oh wow you're right, though it's on the Networks object itself in the source code lol

Shaptic commented 1 year ago

Wait no, this is set in the soroban branch:

https://github.com/stellar/js-stellar-base/blob/soroban/types/index.d.ts#L241-L247

I opened #654 to fix the jsdocs, though.