authorizeInvocation

suspend fun authorizeInvocation(signer: KeyPair, validUntilLedgerSeq: Long, invocation: SorobanAuthorizedInvocationXdr, network: Network, authV2: Boolean = false): SorobanAuthorizationEntryXdr

Builds and signs a new authorization entry from scratch using a KeyPair.

Return

Signed authorization entry

Parameters

signer

KeyPair to sign with

validUntilLedgerSeq

Exclusive future ledger sequence until which this is valid

invocation

Invocation tree being authorized (typically from simulation)

network

Network for replay protection

authV2

When true, creates ADDRESS_V2 credentials instead of the legacy ADDRESS arm. ADDRESS_V2 requires Protocol 27 or later; emitting it on an older network invalidates the transaction.


suspend fun authorizeInvocation(signer: Auth.Signer, publicKey: String, validUntilLedgerSeq: Long, invocation: SorobanAuthorizedInvocationXdr, network: Network, authV2: Boolean = false): SorobanAuthorizationEntryXdr

Builds and signs a new authorization entry from scratch using a custom Signer.

Return

Signed authorization entry

Parameters

signer

Custom signer

publicKey

Public identity of the signer (G... address)

validUntilLedgerSeq

Exclusive future ledger sequence until which this is valid

invocation

Invocation tree being authorized (typically from simulation)

network

Network for replay protection

authV2

When true, creates ADDRESS_V2 credentials instead of the legacy ADDRESS arm. ADDRESS_V2 requires Protocol 27 or later; emitting it on an older network invalidates the transaction.