daemon

package
v0.0.0-...-7838e69 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Wallet1Keys = [][]byte{
	_byte("0x25295f0d1d592a90b333e26e85149708208e9f8e8bc18f6c77bd62f8ad7a6866"),
	_byte("0x51d0b65185db6989ab0b560d6deed19c7ead0e24b9b6372cbecb1f26bdfad000"),
	_byte("0x315ed405fafe339603932eebe8dbfd650ce5dafa561f6928664c75db85f97857"),
	_byte("0x25b1166a43c109cb330af8945d364722757c65ed2bfed5444b5a2f057f82d391"),
	_byte("0x3f5615898238c4c4f906b507ee917e9ea1bb69b93f1dbd11a34d229c3b06784b"),
	_byte("0x055794614bc85ed5436c1f5cab586aab6ca84835788621091f4f3b813761e7a8"),
	_byte("0x1023c68852075965e0f7352dee3f76a84a83e7582c181c10179936c6d6348893"),
	_byte("0x3a941600dc41e5d20e818473b817a28507c23cdfdb4b659c15461ee5c71e41f5"),
	_byte("0x066e3bdc0415530e5c7fed6382d5c822c192b620203cf669903e1810a8c67d06"),
	_byte("0x2b3b88a041168a1c4cd04bdd8de7964fd35238f95442dc678514f9dadb81ec34"),
	_byte("0x2e62dbea7fe3127c3b236a92795dd633be51ee7cdfe5424882a2f355df497117"),
	_byte("0x2042dc809c130e91906c9cb0be2fec0d6afaa8f22635efc7a3c2dbf833c1851a"),
	_byte("0x15283c540041cd85c4533ee47517c8bb101c6207e9acbba2935287405a78502c"),
	_byte("0x03c85e538e1bb30235a87a3758c5571753ca1308b7dee321b74c19f78423999b"),
	_byte("0x45a577d5cab31ac5cfff381500e09655f0799f29b130e6ad61c1eec4b15bf8dd"),
	_byte("0x03cffafa1cbaa7e585eaee07a9d35ae57f6dfe19a9ea53af9c37e9f3dfac617c"),
}

Wallet1Keys are the private keys for the accounts in 'Wallet 1'. These are the well-known interop keys, from index 0 to index 15.

View Source
var Wallet2Keys = [][]byte{

	_byte("0x67496f1d63498dc62da0bf641f55125f6fc971ed1f08f7e9649e75709525fd55"),
	_byte("0x1e892380d153a5032cd54041b76de0a5f0f26dee3f189f829d5d33e720ba3934"),
	_byte("0x5a6ca99e594d26a4c8268441dcdb261f00c63e653991bf77f3e6d661dd1d7a0c"),
	_byte("0x31b5d11b313d1736237139f0c56c5503b9786ce425fbf514446e44152c794d26"),
	_byte("0x46fbedc2776c0d5db0da0d74b0a6ca45940596db7754dd87f1dbeeac396bd707"),
	_byte("0x2abf4b942eaef1bd2e92e98228890e50c408e54e0c7972c1ce67f60a5ae6fdc1"),
	_byte("0x6327b1e58c41d60dd7c3c8b9634204255707c2d12e2513c345001d8926745eea"),
	_byte("0x02a07f22259210b143686ee70a8dea2399ce18165fab780beaccdd486ddf12f4"),
	_byte("0x45113325259c7fad43feca5a07d1182e80d27dec21b069b7aee357965b07b947"),
	_byte("0x4894c61db725b9210c3acd58136797e7295d59b3a1497735fb59d5c5264bd89e"),
	_byte("0x392414fca0757c30af12c4a63afaeee64cf8a92254bd097ecd9c7696b333305a"),
	_byte("0x3e1c4fb1a25381ad757a5a2c98a522d89c796e9ad009ef00c632efbc859a9623"),
	_byte("0x2799ceccbdaf1e36679b413193a363bfe6d2d35c8cf6ff6151165707461eaed7"),
	_byte("0x27cf8e217d8481db8bc343bb6f5eb2993dc43743a2653e221df6db97be2cf004"),
	_byte("0x16782f17ec7cdbc9973e86b179ba8d779afb8e6c28cd5b9caab657fe183f64c1"),
	_byte("0x575ace3c2bf7a175b526d296e8b022357c7ceb8e799d1029d5b267d8598f449f"),
}

Wallet2Keys are the private keys for the accounts in 'Wallet 2'. These are the well-known interop keys, from index 16 to index 31.

Functions

func New

func New(ctx context.Context, path string, id uint64, port uint32, peersMap map[uint64]string) (*logger.LogCapture, string, error)

New creates a Dirk daemon with pre-configured wallets and accounts. If path is supplied it is used to create wallets, otherwise a random filesystem path is generated. id is the identifier for the instance. This should be in the range 1-5, as they are the only values that have certificates available. Because the account keys are well-known this should only be used for testing. Cancelling the context will kill the daemon.

The specifics of what are created are:

  • ND wallet 'Wallet 1' with 16 interop keys indices 0 through 15
  • ND wallet 'Wallet 2' with 16 interop keys indices 16 through 31
  • distributed wallet 'Wallet 3' with no keys
  • full permissions for 'client-test01' to access 'Wallet 1' and 'Wallet 3'
  • full permissions for 'client-test02' to access 'Wallet 2' and 'Wallet 3'
  • full permissions for 'client-test03' to access 'Wallet 1' and 'Wallet 2'

Returns the log capture for the daemon, along with the filesystem path for the wallets.

Types

This section is empty.

Jump to

Keyboard shortcuts

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