wharfkit / session

Create account-based sessions, perform transactions, and allow users to login using Antelope-based blockchains.
Other
9 stars 1 forks source link

Add common chain configurations #59

Closed aaroncox closed 1 year ago

aaroncox commented 1 year ago

Add a predefined list of known chains in the SessionKit which developers can access for default use cases.

The Chains definition would contain both the url and id required for that specific chain.

export const Chains = {
  Jungle4: {
    id: '73e4385a2708e6d7048834fbc1079f2fabb17b3c125b146af438971e90716c4d',
    url: 'https://jungle4.greymass.com'
  }
}

These could then be imported by a developer for quick access to the definitions:

import {Chains} from '@wharfkit/session'

const sessionKit = new SessionKit({
   appName: 'myapp',
   chains: [Chains.Jungle4, Chains.EOS],
   ui: new WebRenderer(),
   walletPlugins: [new WalletPluginAnchor()],
})
aaroncox commented 1 year ago

4 coalition chains that should be added in alpha order, with defaults:

[
    {
      id: "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906",
      url: "https://eos.greymass.com",
      explorer: {
        prefix: "https://bloks.io/transaction/",
        suffix: "",
      },
    },
    {
      id: "4667b205c6838ef70ff7988f6e8257e8be0e1284a2f59699054a018f743b1d11",
      url: "https://telos.greymass.com",
      explorer: {
        prefix: "https://explorer.telos.net/transaction/",
        suffix: "",
      },
    },
    {
      id: "8fc6dce7942189f842170de953932b1f66693ad3788f766e777b6f9d22335c02",
      url: "https://api.uxnetwork.io",
      explorer: {
        prefix: "https://explorer.uxnetwork.io/tx/",
        suffix: "",
      },
    },
    {
      id: "1064487b3cd1a897ce03ae5b6a865651747e2e152090f99c1d19d44e01aea5a4",
      url: "https://wax.greymass.com",
      explorer: {
        prefix: "https://waxblock.io/transaction/",
        suffix: "",
      },
    },
  ]
aaroncox commented 1 year ago

Exported through @wharfkit/common