Table of Contents

Interface IEmulatorProvider

Namespace
NArk.Arkade.Emulator
Assembly
NArk.Arkade.dll

Client surface for an Arkade emulator co-signing service. Mirrors the ts-sdk's EmulatorProvider shape so callers picking a .NET vs. TypeScript wallet stack write the same orchestration code.

public interface IEmulatorProvider

Remarks

The emulator is a co-signing service that:

  1. Owns a private key.
  2. Validates the ArkadeScript attached to each transaction input.
  3. Computes the per-input signing key as emulator_pubkey + tagged_hash("ArkScriptHash", script) · G.
  4. Returns its partial signature, or — when it's the last non-arkd signer — submits the full transaction set to arkd, finalises, and returns the complete PSBTs.

Methods

GetInfoAsync(CancellationToken)

GET /v1/info — version and signing-key fingerprint.

Task<EmulatorInfo> GetInfoAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<EmulatorInfo>

SubmitFinalizationAsync(string, RegisterIntentMessage, IReadOnlyList<string>, IReadOnlyList<ConnectorTreeNode>?, string, CancellationToken)

POST /v1/finalization — co-signs forfeit PSBTs and (conditionally) the commitment tx after the emulator has already co-signed the matching intent via SubmitIntentAsync(string, RegisterIntentMessage, CancellationToken).

Task<EmulatorFinalizationResult> SubmitFinalizationAsync(string signedProof, Messages.RegisterIntentMessage message, IReadOnlyList<string> forfeits, IReadOnlyList<ConnectorTreeNode>? connectorTree, string commitmentTx, CancellationToken cancellationToken = default)

Parameters

signedProof string
message Messages.RegisterIntentMessage
forfeits IReadOnlyList<string>
connectorTree IReadOnlyList<ConnectorTreeNode>
commitmentTx string
cancellationToken CancellationToken

Returns

Task<EmulatorFinalizationResult>

SubmitIntentAsync(string, RegisterIntentMessage, CancellationToken)

POST /v1/intent — co-signs the intent registration proof so the resulting BIP-322 signature is valid for the emulator-tweaked key. Returns the co-signed proof base64.

Task<string> SubmitIntentAsync(string proof, Messages.RegisterIntentMessage message, CancellationToken cancellationToken = default)

Parameters

proof string
message Messages.RegisterIntentMessage
cancellationToken CancellationToken

Returns

Task<string>

SubmitOnchainTxAsync(string, CancellationToken)

POST /v1/onchain-tx — co-signs a fully on-chain spend (no arkd counter-signature) whose inputs are emulator-owned Arkade tapscripts, and returns the signed PSBT base64. Inputs whose tapscript closure also contains the arkd signer pubkey are rejected by the emulator — those must go through SubmitTxAsync(string, IReadOnlyList<string>, CancellationToken) instead. Attach the previous output transaction to inputs that introspection opcodes read via SetArkFieldPrevoutTx(PSBTInput, Transaction).

Task<string> SubmitOnchainTxAsync(string tx, CancellationToken cancellationToken = default)

Parameters

tx string
cancellationToken CancellationToken

Returns

Task<string>

SubmitTxAsync(string, IReadOnlyList<string>, CancellationToken)

POST /v1/tx — submits a partially-signed Arkade transaction plus any checkpoint PSBTs and returns the emulator's co-signed PSBTs.

Task<EmulatorSubmitTxResult> SubmitTxAsync(string arkTx, IReadOnlyList<string> checkpointTxs, CancellationToken cancellationToken = default)

Parameters

arkTx string
checkpointTxs IReadOnlyList<string>
cancellationToken CancellationToken

Returns

Task<EmulatorSubmitTxResult>