1.7.0 • Published 9 months ago

@cityofzion/neon-invoker v1.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Neon-Invoker

Install

npm i @cityofzion/neon-invoker

Initialize NeonInvoker

To use NeonInvoker as a Neo3Invoker you can simply call NeonInvoker.init and pass the NeonInvoker instance to the SDK that requires a Neo3Invoker.

To sign the transactions you should pass an account to the NeonInvoker.init method. You can use the Account class from @cityofzion/neon-core to create an account.

import { NeonInvoker } from '@cityofzion/neon-invoker'
import { default as Neon } from '@cityofzion/neon-js'

const account = Neon.create.account('NKuyBkoGdZZSLyPbJEetheRhMjeznFZszf')

const neonInvoker: Neo3Invoker = await NeonInvoker.init({
  rpcAddress: NeonInvoker.MAINNET,
  account,
})

You can also pass an signingCallback to the NeonInvoker.init method. It should return a Promise of signature string. See here an example implementation of ledger signature.

If you don't want to sign, simply don't pass an account.

import { NeonInvoker } from '@cityofzion/neon-invoker'

const neonInvoker: Neo3Invoker = await NeonInvoker.init({
  rpcAddress: NeonInvoker.MAINNET,
})

You can also pass a custom RPC endpoint to the NeonInvoker.init method.

Another example of initialization is:

const neonInvoker: Neo3Invoker = await NeonInvoker.init({
  rpcAddress: 'http://127.0.0.1:5001',
  account,
})

Usage

The usage of NeonInvoker is documented in the Neo3-Invoker Docs.

1.7.0

9 months ago

1.5.2

10 months ago

1.6.0

10 months ago

1.5.1

11 months ago

1.5.0

11 months ago

1.4.1

11 months ago

1.4.0

1 year ago

1.3.1

1 year ago

1.2.0

1 year ago

1.1.1

2 years ago

1.2.2

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.1.2

2 years ago

1.1.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago