neofsid

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

NeoFSID contract is a contract deployed in NeoFS side chain.

NeoFSID contract used to store connection between OwnerID and it's public keys. OwnerID is a 25-byte N3 wallet address that can be produced from public key. It is one-way conversion. In simple cases NeoFS verifies ownership by checking signature and relation between public key and OwnerID.

In more complex cases, user can use public keys unrelated to OwnerID to maintain secure access to the data. NeoFSID contract stores relation between OwnerID and arbitrary public keys. Data owner can bind or unbind public key with it's account by invoking Bind or Unbind methods of NeoFS contract in main chain. After that, Alphabet nodes produce multi signed AddKey and RemoveKey invocations of NeoFSID contract.

Contract notifications

NeoFSID contract does not produce notifications to process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddKey

func AddKey(owner []byte, keys []interop.PublicKey)

AddKey binds list of provided public keys to OwnerID. Can be invoked only by Alphabet nodes.

This method panics if OwnerID is not ownerSize byte or public key is not 33 byte long. If key is already bound, ignores it.

func Key

func Key(owner []byte) [][]byte

Key method returns list of 33-byte public keys bound with OwnerID.

This method panics if owner is not ownerSize byte long.

func RemoveKey

func RemoveKey(owner []byte, keys []interop.PublicKey)

RemoveKey unbinds provided public keys from OwnerID. Can be invoked only by Alphabet nodes.

This method panics if OwnerID is not ownerSize byte or public key is not 33 byte long. If key is already unbound, ignores it.

func Update added in v0.11.0

func Update(script []byte, manifest []byte, data interface{})

Update method updates contract source code and manifest. Can be invoked only by committee.

func Version

func Version() int

Version returns version of the contract.

Types

type UserInfo

type UserInfo struct {
	Keys [][]byte
}

Jump to

Keyboard shortcuts

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