- User grants - Authorized by the user. Grants a third party access to the user’s shared-mode ciphertexts.
- Network grants - Authorized by the Arcium network. Grants access to MXE-mode or shared-mode ciphertexts without requiring user interaction.
getCreateUserGrantedComplianceGrantFunction
Import:@umbra-privacy/sdk
GetCreateUserGrantedComplianceGrantFunctionArgs
client: IUmbraClient
GetCreateUserGrantedComplianceGrantFunctionDeps
getLatestBlockhash?: GetLatestBlockhashtransactionForwarder?: TransactionForwardermasterViewingKeyX25519KeypairGenerator?: MasterViewingKeyX25519KeypairGeneratorFunction
Returns
CreateUserGrantedComplianceGrantFunction
receiver: Address- The third-party account that will be authorized to call re-encryption.granterX25519: X25519PublicKey- The granter’s X25519 public key (MVK encrypting key).receiverX25519: X25519PublicKey- The receiver’s X25519 public key (the target re-encryption key).nonce: RcEncryptionNonce- Grant nonce, used to differentiate multiple grants to the same receiver.
Example
getDeleteUserGrantedComplianceGrantFunction
Import:@umbra-privacy/sdk
GetDeleteUserGrantedComplianceGrantFunctionArgs
client: IUmbraClient
GetDeleteUserGrantedComplianceGrantFunctionDeps
getLatestBlockhash?: GetLatestBlockhashtransactionForwarder?: TransactionForwardermasterViewingKeyX25519KeypairGenerator?: MasterViewingKeyX25519KeypairGeneratorFunction
Returns
DeleteUserGrantedComplianceGrantFunction
CreateUserGrantedComplianceGrantFunction - pass the same values used when creating the grant.
getQueryUserComplianceGrantFunction
Import:@umbra-privacy/sdk
GetQueryUserComplianceGrantFunctionArgs
client: IUmbraClient
GetQueryUserComplianceGrantFunctionDeps
accountInfoProvider?: AccountInfoProviderFunction
Returns
QueryUserComplianceGrantFunction
getQueryNetworkMxeComplianceGrantFunction
Import:@umbra-privacy/sdk
Returns
QueryNetworkMxeComplianceGrantFunction
getQueryNetworkSharedComplianceGrantFunction
Import:@umbra-privacy/sdk
Returns
QueryNetworkSharedComplianceGrantFunction
QueryComplianceGrantResult
Returned by all three query functions:{ state: "exists" }- The grant is present on-chain.{ state: "non_existent" }- No grant exists for the given parameters.
getReencryptMxeCiphertextsNetworkGrantFunction
Import:@umbra-privacy/sdk
GetReencryptMxeCiphertextsNetworkGrantFunctionArgs
client: IUmbraClient
GetReencryptMxeCiphertextsNetworkGrantFunctionDeps
getLatestBlockhash?: GetLatestBlockhashtransactionForwarder?: TransactionForwarder
Returns
ReencryptMxeCiphertextsNetworkGrantFunction
receiverX25519Key: X25519PublicKey- The receiver’s X25519 public key.nonce: RcEncryptionNonce- The grant nonce identifying which network grant to use.inputEncryptionNonce: RcEncryptionNonce- The nonce used when the ciphertexts were originally encrypted.ciphertexts: readonly Uint8Array[]- The MXE-encrypted ciphertexts to re-encrypt. Must contain between 1 and 6 elements.
getReencryptSharedCiphertextsNetworkGrantFunction
Import:@umbra-privacy/sdk
Returns
ReencryptSharedCiphertextsNetworkGrantFunction
granterX25519Key: X25519PublicKey- The granter’s X25519 public key.receiverX25519Key: X25519PublicKey- The receiver’s X25519 public key.ciphertexts: readonly Uint8Array[]- Must contain between 1 and 6 elements.
getReencryptSharedCiphertextsUserGrantFunction
Import:@umbra-privacy/sdk
Returns
ReencryptSharedCiphertextsUserGrantFunction
ReencryptSharedCiphertextsNetworkGrantFunction. The difference is which on-chain grant account is used to authorize the re-encryption.
ciphertexts: readonly Uint8Array[]- Must contain between 1 and 6 elements.