polygon

package
v1.0.0-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2024 License: BlueOak-1.0.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BipID is the BIP-0044 asset ID for Polygon.
	BipID = 966
)

Variables

View Source
var (
	WalletInfo = asset.WalletInfo{
		Name:              "Polygon",
		SupportedVersions: []uint32{0},
		UnitInfo:          dexpolygon.UnitInfo,
		AvailableWallets: []*asset.WalletDefinition{
			{
				Type:        walletTypeRPC,
				Tab:         "External",
				Description: "Infrastructure providers (e.g. Infura) or local nodes",
				ConfigOpts:  append(eth.RPCOpts, walletOpts...),
				Seeded:      true,
				NoAuth:      true,
			},
		},
		IsAccountBased: true,
	}
)

Functions

func ChainConfig

func ChainConfig(net dex.Network) (c *params.ChainConfig, err error)

ChainConfig returns the core configuration for the blockchain.

func NetworkCompatibilityData

func NetworkCompatibilityData(net dex.Network) (c eth.CompatibilityData, err error)

NetworkCompatibilityData returns the CompatibilityData for the specified network. If using simnet, make sure the simnet harness is running.

Types

type Driver

type Driver struct{}

func (*Driver) Create

func (d *Driver) Create(cfg *asset.CreateWalletParams) error

func (*Driver) DecodeCoinID

func (d *Driver) DecodeCoinID(coinID []byte) (string, error)

func (*Driver) Exists

func (d *Driver) Exists(walletType, dataDir string, settings map[string]string, net dex.Network) (bool, error)

func (*Driver) Info

func (d *Driver) Info() *asset.WalletInfo

func (*Driver) Open

func (d *Driver) Open(cfg *asset.WalletConfig, logger dex.Logger, net dex.Network) (asset.Wallet, error)

Open opens the Polygon exchange wallet. Start the wallet with its Run method.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL