nep6

package
v0.0.0-...-a9ec7bf Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NEP6Account

type NEP6Account struct {
	// address is the base58 encoded address of the account.
	Address string `json:"address"`
	// label is a label that the user has made to the account.
	Label string `json:"label"`
	// isDefault indicates whether the account is the default change account.
	IsDefault bool `json:"isDefault"`
	// lock indicates whether the account is locked by user. The client shouldn't spend the funds in a locked account.
	Lock bool `json:"lock"`
	// key is the private key of the account in the NEP-2 format. This field can be null (for watch-only address or non-standard address).
	Key string `json:"key"`
	// contract is a Contract object which describes the details of the contract. This field can be null (for watch-only address).
	Contract NEP6Contract `json:"contract"`
	// extra is an object that is defined by the implementor of the client for storing extra data. This field can be null.
	Extra interface{} `json:"extra"`
}

type NEP6Contract

type NEP6Contract struct {
	//script is the script code of the contract. This field can be null if the contract has been deployed to the blockchain.
	Script string `json:"script,omitempty"`
	//parameters is an array of Parameter objects which describe the details of each parameter in the contract function. For more information about Parameter object, see the descriptions in NEP-3: NeoContract ABI.
	Parameters []interface{} `json:"parameters,omitempty"`
	// deployed indicates whether the contract has been deployed to the blockchain.
	Deployed bool `json:"deployed,omitempty"`
}

type NEP6Scrypt

type NEP6Scrypt struct {
	N int `json:"n"` // 16384
	R int `json:"r"` // 8
	P int `json:"p"` // 8
}

type NEP6Wallet

type NEP6Wallet struct {
	Name     string        `json:"name"`
	Version  string        `json:"version"` //fixed to 1.0
	Scrypt   NEP6Scrypt    `json:"scrypt"`
	Accounts []NEP6Account `json:"accounts"`
	Extra    interface{}   `json:"extra"`
}

func NewNEP6WithNEP2EncryptedKey

func NewNEP6WithNEP2EncryptedKey(name string, addressLabel string, address string, encryptedKey string) *NEP6Wallet

Jump to

Keyboard shortcuts

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