public class Auth
extends java.lang.Object
SorobanAuthorizationEntry.| Modifier and Type | Class and Description |
|---|---|
static class |
Auth.Signature
A signature, consisting of a public key and a signature.
|
static interface |
Auth.Signer
An interface for signing a
HashIDPreimage to produce a signature. |
| Constructor and Description |
|---|
Auth() |
| Modifier and Type | Method and Description |
|---|---|
static SorobanAuthorizationEntry |
authorizeEntry(SorobanAuthorizationEntry entry,
Auth.Signer signer,
java.lang.Long validUntilLedgerSeq,
Network network)
Actually authorizes an existing authorization entry using the given the credentials and
expiration details, returning a signed copy.
|
static SorobanAuthorizationEntry |
authorizeEntry(SorobanAuthorizationEntry entry,
KeyPair signer,
java.lang.Long validUntilLedgerSeq,
Network network)
Actually authorizes an existing authorization entry using the given the credentials and
expiration details, returning a signed copy.
|
static SorobanAuthorizationEntry |
authorizeEntry(java.lang.String entry,
Auth.Signer signer,
java.lang.Long validUntilLedgerSeq,
Network network)
Actually authorizes an existing authorization entry using the given the credentials and
expiration details, returning a signed copy.
|
static SorobanAuthorizationEntry |
authorizeEntry(java.lang.String entry,
KeyPair signer,
java.lang.Long validUntilLedgerSeq,
Network network)
Actually authorizes an existing authorization entry using the given the credentials and
expiration details, returning a signed copy.
|
static SorobanAuthorizationEntry |
authorizeInvocation(Auth.Signer signer,
java.lang.String publicKey,
java.lang.Long validUntilLedgerSeq,
SorobanAuthorizedInvocation invocation,
Network network)
This builds an entry from scratch, allowing you to express authorization as a function of:
a particular identity (i.e.
|
static SorobanAuthorizationEntry |
authorizeInvocation(KeyPair signer,
java.lang.Long validUntilLedgerSeq,
SorobanAuthorizedInvocation invocation,
Network network)
This builds an entry from scratch, allowing you to express authorization as a function of:
a particular identity (i.e.
|
public static SorobanAuthorizationEntry authorizeEntry(java.lang.String entry, KeyPair signer, java.lang.Long validUntilLedgerSeq, Network network)
This "fills out" the authorization entry with a signature, indicating to the InvokeHostFunctionOperation it's attached to that:
KeyPair or Auth.Signer)
SorobanAuthorizedInvocation or otherwise built)
Network)
entry - a base64 encoded unsigned Soroban authorization entrysigner - a KeyPair which should correspond to the address in the `entry`validUntilLedgerSeq - the (exclusive) future ledger sequence number until which this
authorization entry should be valid (if `currentLedgerSeq==validUntil`, this is expired)network - the network is incorprated into the signaturepublic static SorobanAuthorizationEntry authorizeEntry(SorobanAuthorizationEntry entry, KeyPair signer, java.lang.Long validUntilLedgerSeq, Network network)
This "fills out" the authorization entry with a signature, indicating to the InvokeHostFunctionOperation it's attached to that:
KeyPair or Auth.Signer)
SorobanAuthorizedInvocation or otherwise built)
Network)
entry - a base64 encoded unsigned Soroban authorization entrysigner - a KeyPair which should correspond to the address in the `entry`validUntilLedgerSeq - the (exclusive) future ledger sequence number until which this
authorization entry should be valid (if `currentLedgerSeq==validUntil`, this is expired)network - the network is incorprated into the signaturepublic static SorobanAuthorizationEntry authorizeEntry(java.lang.String entry, Auth.Signer signer, java.lang.Long validUntilLedgerSeq, Network network)
This "fills out" the authorization entry with a signature, indicating to the InvokeHostFunctionOperation it's attached to that:
KeyPair or Auth.Signer)
SorobanAuthorizedInvocation or otherwise built)
Network)
entry - a base64 encoded unsigned Soroban authorization entrysigner - A function which takes a payload (a HashIDPreimage) and returns the
signature of the hash of the raw payload bytes, see Auth.SignervalidUntilLedgerSeq - the (exclusive) future ledger sequence number until which this
authorization entry should be valid (if `currentLedgerSeq==validUntil`, this is expired)network - the network is incorprated into the signaturepublic static SorobanAuthorizationEntry authorizeEntry(SorobanAuthorizationEntry entry, Auth.Signer signer, java.lang.Long validUntilLedgerSeq, Network network)
This "fills out" the authorization entry with a signature, indicating to the InvokeHostFunctionOperation it's attached to that:
KeyPair or Auth.Signer)
SorobanAuthorizedInvocation or otherwise built)
Network)
entry - an unsigned Soroban authorization entrysigner - A function which takes a payload (a HashIDPreimage) and returns the
signature of the hash of the raw payload bytes, see Auth.SignervalidUntilLedgerSeq - the (exclusive) future ledger sequence number until which this
authorization entry should be valid (if `currentLedgerSeq==validUntil`, this is expired)network - the network is incorprated into the signaturepublic static SorobanAuthorizationEntry authorizeInvocation(KeyPair signer, java.lang.Long validUntilLedgerSeq, SorobanAuthorizedInvocation invocation, Network network)
KeyPair or Auth.Signer)
SorobanAuthorizedInvocation or otherwise built)
Network)
This is in contrast to authorizeEntry(java.lang.String, org.stellar.sdk.KeyPair, java.lang.Long, org.stellar.sdk.Network), which signs an existing entry "in
place".
signer - a KeyPair used to sign the entryvalidUntilLedgerSeq - the (exclusive) future ledger sequence number until which this
authorization entry should be valid (if `currentLedgerSeq==validUntil`, this is expired)invocation - invocation the invocation tree that we're authorizing (likely, this comes
from transaction simulation)network - the network is incorprated into the signaturepublic static SorobanAuthorizationEntry authorizeInvocation(Auth.Signer signer, java.lang.String publicKey, java.lang.Long validUntilLedgerSeq, SorobanAuthorizedInvocation invocation, Network network)
KeyPair or Auth.Signer)
SorobanAuthorizedInvocation or otherwise built)
Network)
This is in contrast to authorizeEntry(java.lang.String, org.stellar.sdk.KeyPair, java.lang.Long, org.stellar.sdk.Network), which signs an existing entry "in
place".
signer - A function which takes a payload (a HashIDPreimage) and returns the
signature of the hash of the raw payload bytes, see Auth.SignerpublicKey - the public identity of the signervalidUntilLedgerSeq - the (exclusive) future ledger sequence number until which this
authorization entry should be valid (if `currentLedgerSeq==validUntil`, this is expired)invocation - invocation the invocation tree that we're authorizing (likely, this comes
from transaction simulation)network - the network is incorprated into the signature