@2waychain/2wayjs
Version:
API wrapper to access the AIBlock 2 Way Chain
29 lines (28 loc) • 883 B
TypeScript
import { IKeypair, IRequestValenceSetBody } from '../interfaces';
/**
* Generate the needed request body to place data on the valence server
*
* @export
* @template T
* @param {string} addressKey
* @param {string} addressField
* @param {IKeypair} keyPairForField
* @param {T} value
* @return {*} {IRequestValenceSetBody<T>}
*/
export declare function generateValenceSetBody<T>(address: string, data: T, dataId: string): IRequestValenceSetBody<T>;
/**
* Generate the needed headers to verify the authenticity of the request on Valence nodes
*
* @param {string} address
* @param {IKeypair} keyPair
* @returns
*/
export declare function generateVerificationHeaders(address: string, keyPair: IKeypair): {
headers: {
address: string;
signature: string;
public_key: string;
'Content-Type': string;
};
};