Skip to content

Commit

Permalink
feat: WASM Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritish Budhiraja committed Dec 19, 2023
1 parent 9fa5f76 commit 3048a01
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
10 changes: 10 additions & 0 deletions public/hyperswitch/wasm/euclid.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ export function getAllKeys(): any;
*/
export function getKeyType(key: string): string;
/**
* @returns {any}
*/
export function getThreeDsKeys(): any;
/**
* @returns {any}
*/
export function getSurchargeKeys(): any;
/**
* @param {string} val
* @returns {string}
*/
Expand Down Expand Up @@ -100,6 +108,8 @@ export interface InitOutput {
readonly getAllConnectors: (a: number) => void;
readonly getAllKeys: (a: number) => void;
readonly getKeyType: (a: number, b: number, c: number) => void;
readonly getThreeDsKeys: (a: number) => void;
readonly getSurchargeKeys: (a: number) => void;
readonly getVariantValues: (a: number, b: number, c: number) => void;
readonly addTwo: (a: number, b: number) => number;
readonly getDescriptionCategory: (a: number) => void;
Expand Down
38 changes: 38 additions & 0 deletions public/hyperswitch/wasm/euclid.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,44 @@ export function getKeyType(key) {
}
}

/**
* @returns {any}
*/
export function getThreeDsKeys() {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.getThreeDsKeys(retptr);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}

/**
* @returns {any}
*/
export function getSurchargeKeys() {
try {
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
wasm.getSurchargeKeys(retptr);
var r0 = getInt32Memory0()[retptr / 4 + 0];
var r1 = getInt32Memory0()[retptr / 4 + 1];
var r2 = getInt32Memory0()[retptr / 4 + 2];
if (r2) {
throw takeObject(r1);
}
return takeObject(r0);
} finally {
wasm.__wbindgen_add_to_stack_pointer(16);
}
}

/**
* @param {string} val
* @returns {string}
Expand Down
Binary file modified public/hyperswitch/wasm/euclid_bg.wasm
Binary file not shown.
2 changes: 2 additions & 0 deletions public/hyperswitch/wasm/euclid_bg.wasm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export function runProgram(a: number, b: number, c: number): void;
export function getAllConnectors(a: number): void;
export function getAllKeys(a: number): void;
export function getKeyType(a: number, b: number, c: number): void;
export function getThreeDsKeys(a: number): void;
export function getSurchargeKeys(a: number): void;
export function getVariantValues(a: number, b: number, c: number): void;
export function addTwo(a: number, b: number): number;
export function getDescriptionCategory(a: number): void;
Expand Down

0 comments on commit 3048a01

Please sign in to comment.