Members on this page
Meshline.Sdk
Meshline.Interactions
Nep6AccountSigner Class
Signs Meshline account input with a Neo N3 single-signature account from a NEP-6 wallet.
public sealed class Nep6AccountSigner : Meshline.Interactions.IAccountSigner, System.IDisposable
Inheritance System.Object → Nep6AccountSigner
Implements IAccountSigner, System.IDisposable
Remarks
The caller owns this signer and must dispose it. Loading never changes the wallet or registers DI services.
Properties
Nep6AccountSigner.AccountId Property
The account's CAIP-10 identifier.
public string AccountId { get; }
Implements AccountId
Property Value
Nep6AccountSigner.Address Property
The selected Neo N3 address.
public string Address { get; }
Property Value
Nep6AccountSigner.PublicKey Property
The account public key corresponding to AccountId.
public System.Collections.Immutable.ImmutableArray<byte> PublicKey { get; }
Implements PublicKey
Property Value
System.Collections.Immutable.ImmutableArray<System.Byte>
Methods
Nep6AccountSigner.Dispose() Method
Releases the decrypted signing key. The wallet file is unchanged.
public void Dispose();
Implements Dispose()
Nep6AccountSigner.Load(string, string, NetworkContext, int) Method
Loads an existing wallet file, selecting its first account unless an index is supplied.
public static Meshline.Interactions.Nep6AccountSigner Load(string path, string password, Meshline.Models.NetworkContext context, int accountIndex=0);
Parameters
path System.String
The wallet file path, chosen by the application.
password System.String
The wallet password, normalized to NFC for NEP-2 decryption.
context NetworkContext
The trusted network used in the account identifier.
accountIndex System.Int32
A zero-based index in file order; no fallback to another account occurs.
Returns
Nep6AccountSigner
An unlocked signer owned by the caller.
Nep6AccountSigner.Parse(string, string, NetworkContext, int) Method
Loads wallet JSON supplied by the application without requiring filesystem access.
public static Meshline.Interactions.Nep6AccountSigner Parse(string walletJson, string password, Meshline.Models.NetworkContext context, int accountIndex=0);
Parameters
walletJson System.String
Neo N3 NEP-6 wallet JSON.
password System.String
The wallet password, normalized to NFC for NEP-2 decryption.
context NetworkContext
The trusted network used in the account identifier.
accountIndex System.Int32
A zero-based index in file order; defaults to the first account.
Returns
Nep6AccountSigner
An unlocked signer owned by the caller.
Nep6AccountSigner.SignAsync(ReadOnlyMemory<byte>, CancellationToken) Method
Signs the supplied bytes using the account signing key.
public System.Threading.Tasks.Task<byte[]> SignAsync(System.ReadOnlyMemory<byte> data, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
data System.ReadOnlyMemory<System.Byte>
The exact bytes to sign or verify.
cancellationToken System.Threading.CancellationToken
A token that can cancel the operation.
Implements SignAsync(ReadOnlyMemory<byte>, CancellationToken)
Returns
System.Threading.Tasks.Task<System.Byte[]>
The signature over the supplied input bytes.
Exceptions
System.OperationCanceledException
The operation observes cancellation of cancellationToken.