initImportPrivateKey method
Future<TInitImportPrivateKeyResponse>
initImportPrivateKey({
- required TInitImportPrivateKeyBody input,
Initialize a new private key import.
Sign the provided TInitImportPrivateKeyBody with the client's stamp function and submit the request (POST /public/v1/submit/init_import_private_key).
See also: stampInitImportPrivateKey.
Implementation
Future<TInitImportPrivateKeyResponse> initImportPrivateKey({
required TInitImportPrivateKeyBody input,
}) async {
final body = packActivityBody(
bodyJson: input.toJson(),
fallbackOrganizationId: input.organizationId ??
config.organizationId ??
(throw Exception(
"Missing organization ID, please pass in a sub-organizationId or instantiate the client with one.")),
activityType: 'ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY',
);
return await request<Map<String, dynamic>, TInitImportPrivateKeyResponse>(
"/public/v1/submit/init_import_private_key",
body,
(json) => TInitImportPrivateKeyResponse.fromJson(
transformActivityResponse(json, 'InitImportPrivateKey')));
}