import { Known } from '../grpc/upward.js'; import { ArInfo, AttributeKey, AttributesKeys, CdiRandomness, CredentialDeploymentDetails, CredentialDeploymentInfo, CredentialDeploymentPayload, CredentialPublicKeys, CryptographicParameters, HexString, IdentityInput, IdentityObjectV1, IpInfo, Network, UnsignedCdiWithRandomness, UnsignedCredentialDeploymentInformation, VerifyKey } from '../types.js'; import * as AccountAddress from '../types/AccountAddress.js'; import * as TransactionExpiry from '../types/TransactionExpiry.js'; /** * Create a credential deployment transaction payload used when deploying a new account. * * @deprecated This function doesn't use allow supplying the randomness. {@link createCredentialPayload} or {@link createCredentialPayloadNoSeed} should be used instead. * @param identity the identity to create a credential for * @param cryptographicParameters the global cryptographic parameters from the chain * @param threshold the signature threshold for the credential, has to be less than number of public keys * @param publicKeys the public keys for the account * @param credentialIndex the index of the credential to create, has to be in sequence and unused * @param revealedAttributes the attributes about the account holder that should be revealed on chain * @param expiry the expiry of the transaction * @returns the details used in a credential deployment transaction */ export declare function createCredentialDeploymentPayload(identity: IdentityInput, cryptographicParameters: CryptographicParameters, threshold: number, publicKeys: VerifyKey[], credentialIndex: number, revealedAttributes: AttributeKey[], expiry: TransactionExpiry.Type): CredentialDeploymentPayload & CdiRandomness; /** * Create an unsigned credential for an existing account. This credential has to be signed by * the creator before it can be deployed on the existing account. * @param identity the identity to create a credential for * @param cryptographicParameters the global cryptographic parameters from the chain * @param threshold the signature threshold for the credential, has to be less than number of public keys * @param publicKeys the public keys for the credential * @param credentialIndex the index of the credential to create, has to be in sequence and unused * @param revealedAttributes the attributes about the account holder that should be revealed on chain * @param address the account address to associated the credential with */ export declare function createUnsignedCredentialForExistingAccount(identity: IdentityInput, cryptographicParameters: CryptographicParameters, threshold: number, publicKeys: VerifyKey[], credentialIndex: number, revealedAttributes: AttributeKey[], address: AccountAddress.Type): UnsignedCdiWithRandomness; /** * Combines the unsigned credential information and the signatures to the signed credential * deployment information. This is the information that the account owner needs to be able * to deploy the credential to their account. * @param unsignedCredentialInfo the unsigned credential information * @param signatures the signatures on the unsigned credential information * @returns signed credential deployment information, used in an update credentials transaction to deploy it */ export declare function buildSignedCredentialForExistingAccount(unsignedCredentialInfo: UnsignedCredentialDeploymentInformation, signatures: string[]): CredentialDeploymentInfo; /** * Derives the account address from a credential id. This is the address of the * account that will be created by the credential deployment transaction containing * this credential id. * @param credId the credential id from a credential deployment transaction * @returns the account address */ export declare function getAccountAddress(credId: string): AccountAddress.Type; type CredentialInputCommon = { ipInfo: IpInfo; globalContext: CryptographicParameters; arsInfos: Record; idObject: IdentityObjectV1; revealedAttributes: AttributeKey[]; credNumber: number; }; export type CredentialInput = CredentialInputCommon & { seedAsHex: string; net: Network; identityIndex: number; }; export type CredentialInputNoSeed = CredentialInputCommon & { idCredSec: HexString; prfKey: HexString; sigRetrievelRandomness: HexString; credentialPublicKeys: Known; attributeRandomness: Record; }; /** * Creates an unsigned credential for a new account, using the version 1 algorithm, which uses a seed to generate keys and commitments. */ export declare function createCredentialPayload(input: CredentialInput, expiry: TransactionExpiry.Type): CredentialDeploymentPayload & CdiRandomness; /** * Creates an unsigned credential for a new account, using the version 1 algorithm, but without requiring the seed to be provided directly. */ export declare function createCredentialPayloadNoSeed(input: CredentialInputNoSeed, expiry: TransactionExpiry.Type): CredentialDeploymentPayload & CdiRandomness; export declare function signCredentialTransaction(credDeployment: CredentialDeploymentDetails, signingKey: HexString): Promise; export {};