Skip to content
This repository was archived by the owner on Jul 31, 2019. It is now read-only.

Commit 737a4be

Browse files
rytmarshhadleym
authored andcommitted
exposed testing mint tokens for node wrapper (#308)
* exposed testing mint tokens for node wrapper * moved mint tokens into mock class
1 parent 94a96c8 commit 737a4be

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

vcx/wrappers/node/src/api/VCXMock.ts

+4
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ export class VCXMock {
1515
static setVcxMock (message: VCXMockMessage) {
1616
rustAPI().vcx_set_next_agency_response(message)
1717
}
18+
19+
static mintTokens (numberOfAddresses: number, tokensPerAddress: number): void {
20+
rustAPI().vcx_mint_tokens(numberOfAddresses, tokensPerAddress)
21+
}
1822
}

vcx/wrappers/node/src/rustlib.ts

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export interface IFFIEntryPoint {
4747
vcx_init_with_config: (commandId: number, config: string, cb: any) => number,
4848
vcx_shutdown: (deleteIndyInfo: boolean) => number,
4949
vcx_error_c_message: (errorCode: number) => string,
50+
vcx_mint_tokens: (numberOfAddresses: number, tokensPerAddress: number) => void,
5051
vcx_version: () => string,
5152

5253
// wallet
@@ -165,6 +166,7 @@ export const FFIConfiguration: { [ Key in keyof IFFIEntryPoint ]: any } = {
165166
vcx_agent_provision_async: [FFI_ERROR_CODE, [FFI_COMMAND_HANDLE, FFI_STRING_DATA, FFI_CALLBACK_PTR]],
166167
vcx_agent_update_info: [FFI_ERROR_CODE, [FFI_COMMAND_HANDLE, FFI_STRING_DATA, FFI_CALLBACK_PTR]],
167168
vcx_update_institution_info: [FFI_ERROR_CODE, [FFI_STRING_DATA, FFI_STRING_DATA]],
169+
vcx_mint_tokens: [FFI_VOID, [FFI_UNSIGNED_INT, FFI_UNSIGNED_INT]],
168170

169171
// wallet
170172
vcx_wallet_get_token_info: [FFI_ERROR_CODE, [FFI_COMMAND_HANDLE, FFI_PAYMENT_HANDLE, FFI_CALLBACK_PTR]],

0 commit comments

Comments
 (0)