diff --git a/wrappers/javascript/indy-vdr-nodejs/src/NodeJSIndyVdr.ts b/wrappers/javascript/indy-vdr-nodejs/src/NodeJSIndyVdr.ts index c5844bc5..65de5f8f 100644 --- a/wrappers/javascript/indy-vdr-nodejs/src/NodeJSIndyVdr.ts +++ b/wrappers/javascript/indy-vdr-nodejs/src/NodeJSIndyVdr.ts @@ -358,10 +358,20 @@ export class NodeJSIndyVdr implements IndyVdr { public buildNymRequest(options: NymRequestOptions): number { const requestHandle = allocateHandle() - const { dest, submitterDid, alias, role, verkey } = serializeArguments(options) + const { dest, submitterDid, alias, role, verkey, diddocContent } = serializeArguments(options) + const version = options.version || -1 this.handleError( - this.nativeIndyVdr.indy_vdr_build_nym_request(submitterDid, dest, verkey, alias, role, requestHandle) + this.nativeIndyVdr.indy_vdr_build_nym_request( + submitterDid, + dest, + verkey, + alias, + role, + diddocContent, + version, + requestHandle + ) ) return handleReturnPointer(requestHandle) diff --git a/wrappers/javascript/indy-vdr-nodejs/src/library/NativeBindings.ts b/wrappers/javascript/indy-vdr-nodejs/src/library/NativeBindings.ts index 7241037c..98fc4bf0 100644 --- a/wrappers/javascript/indy-vdr-nodejs/src/library/NativeBindings.ts +++ b/wrappers/javascript/indy-vdr-nodejs/src/library/NativeBindings.ts @@ -79,6 +79,8 @@ export interface NativeMethods { arg2: string, arg3: string, arg4: string, + arg5: string, + arg6: number, requestHandlePtr: Buffer ) => number indy_vdr_pool_create: (arg0: string, poolHandlePtr: Buffer) => number diff --git a/wrappers/javascript/indy-vdr-nodejs/src/library/bindings.ts b/wrappers/javascript/indy-vdr-nodejs/src/library/bindings.ts index 1d8aed90..4914066c 100644 --- a/wrappers/javascript/indy-vdr-nodejs/src/library/bindings.ts +++ b/wrappers/javascript/indy-vdr-nodejs/src/library/bindings.ts @@ -67,7 +67,7 @@ export const nativeBindings = { indy_vdr_build_get_validator_info_request: [FFI_ERROR_CODE, [FFI_STRING, FFI_REQUEST_HANDLE_POINTER]], indy_vdr_build_nym_request: [ FFI_ERROR_CODE, - [FFI_STRING, FFI_STRING, FFI_STRING, FFI_STRING, FFI_STRING, FFI_REQUEST_HANDLE_POINTER], + [FFI_STRING, FFI_STRING, FFI_STRING, FFI_STRING, FFI_STRING, FFI_STRING, FFI_INT32, FFI_REQUEST_HANDLE_POINTER], ], indy_vdr_build_revoc_reg_def_request: [FFI_ERROR_CODE, [FFI_STRING, FFI_STRING, FFI_REQUEST_HANDLE_POINTER]], indy_vdr_build_revoc_reg_entry_request: [ diff --git a/wrappers/javascript/indy-vdr-shared/src/builder/NymRequest.ts b/wrappers/javascript/indy-vdr-shared/src/builder/NymRequest.ts index b405f801..e633304c 100644 --- a/wrappers/javascript/indy-vdr-shared/src/builder/NymRequest.ts +++ b/wrappers/javascript/indy-vdr-shared/src/builder/NymRequest.ts @@ -8,6 +8,8 @@ export type NymRequestOptions = { verkey?: string alias?: string role?: 'STEWARD' | 'TRUSTEE' | 'ENDORSER' | 'NETWORK_MONITOR' + diddocContent?: string + version?: number } interface NymResultTxn extends WriteRequestResultTxnBase {