Class Auth
SorobanAuthorizationEntry.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA signature, consisting of a public key and a signature.static interfaceAn interface for signing aHashIDPreimageto produce a signature. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SorobanAuthorizationEntryauthorizeEntry(String entry, Auth.Signer signer, Long validUntilLedgerSeq, Network network) Actually authorizes an existing authorization entry using the given the credentials and expiration details, returning a signed copy.static SorobanAuthorizationEntryauthorizeEntry(String entry, KeyPair signer, Long validUntilLedgerSeq, Network network) Actually authorizes an existing authorization entry using the given the credentials and expiration details, returning a signed copy.static SorobanAuthorizationEntryauthorizeEntry(SorobanAuthorizationEntry entry, Auth.Signer signer, Long validUntilLedgerSeq, Network network) Actually authorizes an existing authorization entry using the given the credentials and expiration details, returning a signed copy.static SorobanAuthorizationEntryauthorizeEntry(SorobanAuthorizationEntry entry, KeyPair signer, Long validUntilLedgerSeq, Network network) Actually authorizes an existing authorization entry using the given the credentials and expiration details, returning a signed copy.static SorobanAuthorizationEntryauthorizeInvocation(Auth.Signer signer, String publicKey, 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 SorobanAuthorizationEntryauthorizeInvocation(KeyPair signer, 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.
-
Constructor Details
-
Auth
public Auth()
-
-
Method Details
-
authorizeEntry
public static SorobanAuthorizationEntry authorizeEntry(String entry, KeyPair signer, Long validUntilLedgerSeq, Network network) Actually authorizes an existing authorization entry using the given the credentials and expiration details, returning a signed copy.This "fills out" the authorization entry with a signature, indicating to the
InvokeHostFunctionOperationit's attached to that:- a particular identity (i.e. signing
KeyPairorAuth.Signer) - approving the execution of an invocation tree (i.e. a simulation-acquired
SorobanAuthorizedInvocationor otherwise built) - on a particular network (uniquely identified by its passphrase, see
Network) - until a particular ledger sequence is reached.
- Parameters:
entry- a base64 encoded unsigned Soroban authorization entrysigner- aKeyPairwhich 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 signature- Returns:
- a signed Soroban authorization entry
- a particular identity (i.e. signing
-
authorizeEntry
public static SorobanAuthorizationEntry authorizeEntry(SorobanAuthorizationEntry entry, KeyPair signer, Long validUntilLedgerSeq, Network network) Actually authorizes an existing authorization entry using the given the credentials and expiration details, returning a signed copy.This "fills out" the authorization entry with a signature, indicating to the
InvokeHostFunctionOperationit's attached to that:- a particular identity (i.e. signing
KeyPairorAuth.Signer) - approving the execution of an invocation tree (i.e. a simulation-acquired
SorobanAuthorizedInvocationor otherwise built) - on a particular network (uniquely identified by its passphrase, see
Network) - until a particular ledger sequence is reached.
- Parameters:
entry- a base64 encoded unsigned Soroban authorization entrysigner- aKeyPairwhich 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 signature- Returns:
- a signed Soroban authorization entry
- a particular identity (i.e. signing
-
authorizeEntry
public static SorobanAuthorizationEntry authorizeEntry(String entry, Auth.Signer signer, Long validUntilLedgerSeq, Network network) Actually authorizes an existing authorization entry using the given the credentials and expiration details, returning a signed copy.This "fills out" the authorization entry with a signature, indicating to the
InvokeHostFunctionOperationit's attached to that:- a particular identity (i.e. signing
KeyPairorAuth.Signer) - approving the execution of an invocation tree (i.e. a simulation-acquired
SorobanAuthorizedInvocationor otherwise built) - on a particular network (uniquely identified by its passphrase, see
Network) - until a particular ledger sequence is reached.
- Parameters:
entry- a base64 encoded unsigned Soroban authorization entrysigner- A function which takes a payload (aHashIDPreimage) and returns the signature of the hash of the raw payload bytes, seeAuth.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 signature- Returns:
- a signed Soroban authorization entry
- a particular identity (i.e. signing
-
authorizeEntry
public static SorobanAuthorizationEntry authorizeEntry(SorobanAuthorizationEntry entry, Auth.Signer signer, Long validUntilLedgerSeq, Network network) Actually authorizes an existing authorization entry using the given the credentials and expiration details, returning a signed copy.This "fills out" the authorization entry with a signature, indicating to the
InvokeHostFunctionOperationit's attached to that:- a particular identity (i.e. signing
KeyPairorAuth.Signer) - approving the execution of an invocation tree (i.e. a simulation-acquired
SorobanAuthorizedInvocationor otherwise built) - on a particular network (uniquely identified by its passphrase, see
Network) - until a particular ledger sequence is reached.
- Parameters:
entry- an unsigned Soroban authorization entrysigner- A function which takes a payload (aHashIDPreimage) and returns the signature of the hash of the raw payload bytes, seeAuth.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 signature- Returns:
- a signed Soroban authorization entry
- a particular identity (i.e. signing
-
authorizeInvocation
public static SorobanAuthorizationEntry authorizeInvocation(KeyPair signer, 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. signing
KeyPairorAuth.Signer) - approving the execution of an invocation tree (i.e. a simulation-acquired
SorobanAuthorizedInvocationor otherwise built) - on a particular network (uniquely identified by its passphrase, see
Network) - until a particular ledger sequence is reached.
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".- Parameters:
signer- aKeyPairused 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 signature- Returns:
- a signed Soroban authorization entry
- a particular identity (i.e. signing
-
authorizeInvocation
public static SorobanAuthorizationEntry authorizeInvocation(Auth.Signer signer, String publicKey, 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. signing
KeyPairorAuth.Signer) - approving the execution of an invocation tree (i.e. a simulation-acquired
SorobanAuthorizedInvocationor otherwise built) - on a particular network (uniquely identified by its passphrase, see
Network) - until a particular ledger sequence is reached.
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".- Parameters:
signer- A function which takes a payload (aHashIDPreimage) and returns the signature of the hash of the raw payload bytes, seeAuth.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- Returns:
- a signed Soroban authorization entry
- a particular identity (i.e. signing
-