@rolly-dev/wasm-signer 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -12
- package/dist/node/README.md +9 -12
- package/dist/node/rolly_wasm_signer.d.ts +5 -143
- package/dist/node/rolly_wasm_signer.js +31 -427
- package/dist/node/rolly_wasm_signer_bg.wasm +0 -0
- package/dist/node/rolly_wasm_signer_bg.wasm.d.ts +5 -15
- package/dist/node-inline/README.md +9 -12
- package/dist/node-inline/rolly_wasm_signer.d.ts +5 -143
- package/dist/node-inline/rolly_wasm_signer.js +32 -428
- package/dist/node-inline/rolly_wasm_signer.mjs +33 -419
- package/dist/node-inline/rolly_wasm_signer_bg.wasm.d.ts +5 -15
- package/dist/web/README.md +9 -12
- package/dist/web/rolly_wasm_signer.d.ts +10 -158
- package/dist/web/rolly_wasm_signer.js +31 -417
- package/dist/web/rolly_wasm_signer_bg.wasm +0 -0
- package/dist/web/rolly_wasm_signer_bg.wasm.d.ts +5 -15
- package/js/browser.d.mts +0 -10
- package/js/browser.mjs +0 -10
- package/js/index.d.ts +0 -10
- package/js/node-inline.cjs +0 -10
- package/js/node-inline.mjs +0 -10
- package/js/node.cjs +0 -10
- package/js/node.mjs +0 -10
- package/js/react.d.mts +1 -11
- package/js/react.mjs +0 -20
- package/package.json +1 -1
package/js/browser.mjs
CHANGED
|
@@ -5,7 +5,6 @@ export {
|
|
|
5
5
|
poseidon2_two_to_one,
|
|
6
6
|
derive_session_key,
|
|
7
7
|
session_public_key,
|
|
8
|
-
create_bet_auth,
|
|
9
8
|
compute_server_seed_hash,
|
|
10
9
|
seed_hash_truncated,
|
|
11
10
|
string_to_user_seed,
|
|
@@ -14,15 +13,6 @@ export {
|
|
|
14
13
|
goldilocks_fields_to_hex,
|
|
15
14
|
goldilocks_modulus,
|
|
16
15
|
goldilocks_reduce,
|
|
17
|
-
schnorr_keygen,
|
|
18
|
-
schnorr_pubkey,
|
|
19
|
-
schnorr_sign_tx,
|
|
20
|
-
schnorr_verify_tx,
|
|
21
|
-
schnorr_pk_hash,
|
|
22
|
-
schnorr_pk_hash_hex,
|
|
23
|
-
schnorr_pk_encode,
|
|
24
|
-
schnorr_sign_cpk,
|
|
25
|
-
compute_tx_msg_hash,
|
|
26
16
|
amount_split,
|
|
27
17
|
compute_address_hash,
|
|
28
18
|
} from '../dist/web/rolly_wasm_signer.js';
|
package/js/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export {
|
|
|
3
3
|
poseidon2_two_to_one,
|
|
4
4
|
derive_session_key,
|
|
5
5
|
session_public_key,
|
|
6
|
-
create_bet_auth,
|
|
7
6
|
compute_server_seed_hash,
|
|
8
7
|
seed_hash_truncated,
|
|
9
8
|
string_to_user_seed,
|
|
@@ -12,15 +11,6 @@ export {
|
|
|
12
11
|
goldilocks_fields_to_hex,
|
|
13
12
|
goldilocks_modulus,
|
|
14
13
|
goldilocks_reduce,
|
|
15
|
-
schnorr_keygen,
|
|
16
|
-
schnorr_pubkey,
|
|
17
|
-
schnorr_sign_tx,
|
|
18
|
-
schnorr_verify_tx,
|
|
19
|
-
schnorr_pk_hash,
|
|
20
|
-
schnorr_pk_hash_hex,
|
|
21
|
-
schnorr_pk_encode,
|
|
22
|
-
schnorr_sign_cpk,
|
|
23
|
-
compute_tx_msg_hash,
|
|
24
14
|
amount_split,
|
|
25
15
|
compute_address_hash,
|
|
26
16
|
} from '../dist/node-inline/rolly_wasm_signer.js';
|
package/js/node-inline.cjs
CHANGED
|
@@ -7,7 +7,6 @@ module.exports = {
|
|
|
7
7
|
poseidon2_two_to_one: wasm.poseidon2_two_to_one,
|
|
8
8
|
derive_session_key: wasm.derive_session_key,
|
|
9
9
|
session_public_key: wasm.session_public_key,
|
|
10
|
-
create_bet_auth: wasm.create_bet_auth,
|
|
11
10
|
compute_server_seed_hash: wasm.compute_server_seed_hash,
|
|
12
11
|
seed_hash_truncated: wasm.seed_hash_truncated,
|
|
13
12
|
string_to_user_seed: wasm.string_to_user_seed,
|
|
@@ -16,15 +15,6 @@ module.exports = {
|
|
|
16
15
|
goldilocks_fields_to_hex: wasm.goldilocks_fields_to_hex,
|
|
17
16
|
goldilocks_modulus: wasm.goldilocks_modulus,
|
|
18
17
|
goldilocks_reduce: wasm.goldilocks_reduce,
|
|
19
|
-
schnorr_keygen: wasm.schnorr_keygen,
|
|
20
|
-
schnorr_pubkey: wasm.schnorr_pubkey,
|
|
21
|
-
schnorr_sign_tx: wasm.schnorr_sign_tx,
|
|
22
|
-
schnorr_verify_tx: wasm.schnorr_verify_tx,
|
|
23
|
-
schnorr_pk_hash: wasm.schnorr_pk_hash,
|
|
24
|
-
schnorr_pk_hash_hex: wasm.schnorr_pk_hash_hex,
|
|
25
|
-
schnorr_pk_encode: wasm.schnorr_pk_encode,
|
|
26
|
-
schnorr_sign_cpk: wasm.schnorr_sign_cpk,
|
|
27
|
-
compute_tx_msg_hash: wasm.compute_tx_msg_hash,
|
|
28
18
|
amount_split: wasm.amount_split,
|
|
29
19
|
compute_address_hash: wasm.compute_address_hash,
|
|
30
20
|
};
|
package/js/node-inline.mjs
CHANGED
|
@@ -3,7 +3,6 @@ export {
|
|
|
3
3
|
poseidon2_two_to_one,
|
|
4
4
|
derive_session_key,
|
|
5
5
|
session_public_key,
|
|
6
|
-
create_bet_auth,
|
|
7
6
|
compute_server_seed_hash,
|
|
8
7
|
seed_hash_truncated,
|
|
9
8
|
string_to_user_seed,
|
|
@@ -12,15 +11,6 @@ export {
|
|
|
12
11
|
goldilocks_fields_to_hex,
|
|
13
12
|
goldilocks_modulus,
|
|
14
13
|
goldilocks_reduce,
|
|
15
|
-
schnorr_keygen,
|
|
16
|
-
schnorr_pubkey,
|
|
17
|
-
schnorr_sign_tx,
|
|
18
|
-
schnorr_verify_tx,
|
|
19
|
-
schnorr_pk_hash,
|
|
20
|
-
schnorr_pk_hash_hex,
|
|
21
|
-
schnorr_pk_encode,
|
|
22
|
-
schnorr_sign_cpk,
|
|
23
|
-
compute_tx_msg_hash,
|
|
24
14
|
amount_split,
|
|
25
15
|
compute_address_hash,
|
|
26
16
|
} from '../dist/node-inline/rolly_wasm_signer.mjs';
|
package/js/node.cjs
CHANGED
|
@@ -7,7 +7,6 @@ module.exports = {
|
|
|
7
7
|
poseidon2_two_to_one: wasm.poseidon2_two_to_one,
|
|
8
8
|
derive_session_key: wasm.derive_session_key,
|
|
9
9
|
session_public_key: wasm.session_public_key,
|
|
10
|
-
create_bet_auth: wasm.create_bet_auth,
|
|
11
10
|
compute_server_seed_hash: wasm.compute_server_seed_hash,
|
|
12
11
|
seed_hash_truncated: wasm.seed_hash_truncated,
|
|
13
12
|
string_to_user_seed: wasm.string_to_user_seed,
|
|
@@ -16,15 +15,6 @@ module.exports = {
|
|
|
16
15
|
goldilocks_fields_to_hex: wasm.goldilocks_fields_to_hex,
|
|
17
16
|
goldilocks_modulus: wasm.goldilocks_modulus,
|
|
18
17
|
goldilocks_reduce: wasm.goldilocks_reduce,
|
|
19
|
-
schnorr_keygen: wasm.schnorr_keygen,
|
|
20
|
-
schnorr_pubkey: wasm.schnorr_pubkey,
|
|
21
|
-
schnorr_sign_tx: wasm.schnorr_sign_tx,
|
|
22
|
-
schnorr_verify_tx: wasm.schnorr_verify_tx,
|
|
23
|
-
schnorr_pk_hash: wasm.schnorr_pk_hash,
|
|
24
|
-
schnorr_pk_hash_hex: wasm.schnorr_pk_hash_hex,
|
|
25
|
-
schnorr_pk_encode: wasm.schnorr_pk_encode,
|
|
26
|
-
schnorr_sign_cpk: wasm.schnorr_sign_cpk,
|
|
27
|
-
compute_tx_msg_hash: wasm.compute_tx_msg_hash,
|
|
28
18
|
amount_split: wasm.amount_split,
|
|
29
19
|
compute_address_hash: wasm.compute_address_hash,
|
|
30
20
|
};
|
package/js/node.mjs
CHANGED
|
@@ -8,7 +8,6 @@ export const {
|
|
|
8
8
|
poseidon2_two_to_one,
|
|
9
9
|
derive_session_key,
|
|
10
10
|
session_public_key,
|
|
11
|
-
create_bet_auth,
|
|
12
11
|
compute_server_seed_hash,
|
|
13
12
|
seed_hash_truncated,
|
|
14
13
|
string_to_user_seed,
|
|
@@ -17,15 +16,6 @@ export const {
|
|
|
17
16
|
goldilocks_fields_to_hex,
|
|
18
17
|
goldilocks_modulus,
|
|
19
18
|
goldilocks_reduce,
|
|
20
|
-
schnorr_keygen,
|
|
21
|
-
schnorr_pubkey,
|
|
22
|
-
schnorr_sign_tx,
|
|
23
|
-
schnorr_verify_tx,
|
|
24
|
-
schnorr_pk_hash,
|
|
25
|
-
schnorr_pk_hash_hex,
|
|
26
|
-
schnorr_pk_encode,
|
|
27
|
-
schnorr_sign_cpk,
|
|
28
|
-
compute_tx_msg_hash,
|
|
29
19
|
amount_split,
|
|
30
20
|
compute_address_hash,
|
|
31
21
|
} = wasm;
|
package/js/react.d.mts
CHANGED
|
@@ -4,8 +4,7 @@ export interface RollyWasmResult {
|
|
|
4
4
|
poseidon2_hash: (input: BigUint64Array) => BigUint64Array;
|
|
5
5
|
poseidon2_two_to_one: (left: BigUint64Array, right: BigUint64Array) => BigUint64Array;
|
|
6
6
|
derive_session_key: (sig_bytes: Uint8Array) => BigUint64Array;
|
|
7
|
-
session_public_key: (session_key: BigUint64Array) => BigUint64Array;
|
|
8
|
-
create_bet_auth: (session_key: BigUint64Array, bet_amount: bigint, nonce: bigint) => BigUint64Array;
|
|
7
|
+
session_public_key: (session_key: BigUint64Array, session_expiry: bigint) => BigUint64Array;
|
|
9
8
|
compute_server_seed_hash: (server_seed: BigUint64Array) => BigUint64Array;
|
|
10
9
|
seed_hash_truncated: (server_seed: BigUint64Array) => BigUint64Array;
|
|
11
10
|
string_to_user_seed: (input: string) => BigUint64Array;
|
|
@@ -14,15 +13,6 @@ export interface RollyWasmResult {
|
|
|
14
13
|
goldilocks_fields_to_hex: (fields: BigUint64Array) => string;
|
|
15
14
|
goldilocks_modulus: () => bigint;
|
|
16
15
|
goldilocks_reduce: (value: bigint) => bigint;
|
|
17
|
-
schnorr_keygen: (entropy: Uint8Array) => string;
|
|
18
|
-
schnorr_pubkey: (sk_hex: string) => string;
|
|
19
|
-
schnorr_sign_tx: (sk_hex: string, tx_type: number, user_id: number, currency_id: number, amount_lo: number, amount_hi: number, session_expiry: bigint) => any;
|
|
20
|
-
schnorr_verify_tx: (pk_hex: string, sig_s_hex: string, sig_e_hex: string, tx_type: number, user_id: number, currency_id: number, amount_lo: number, amount_hi: number, session_expiry: bigint) => boolean;
|
|
21
|
-
schnorr_pk_hash: (pk_hex: string) => BigUint64Array;
|
|
22
|
-
schnorr_pk_hash_hex: (pk_hex: string) => string;
|
|
23
|
-
schnorr_pk_encode: (pk_hex: string) => BigUint64Array;
|
|
24
|
-
schnorr_sign_cpk: (old_sk_hex: string, user_id: number, new_pk_hash: BigUint64Array) => any;
|
|
25
|
-
compute_tx_msg_hash: (tx_type: number, user_id: number, currency_id: number, amount_lo: number, amount_hi: number, session_expiry: bigint) => BigUint64Array;
|
|
26
16
|
amount_split: (amount: bigint) => Uint32Array;
|
|
27
17
|
compute_address_hash: (address_hex: string) => BigUint64Array;
|
|
28
18
|
}
|
package/js/react.mjs
CHANGED
|
@@ -4,7 +4,6 @@ import init, {
|
|
|
4
4
|
poseidon2_two_to_one,
|
|
5
5
|
derive_session_key,
|
|
6
6
|
session_public_key,
|
|
7
|
-
create_bet_auth,
|
|
8
7
|
compute_server_seed_hash,
|
|
9
8
|
seed_hash_truncated,
|
|
10
9
|
string_to_user_seed,
|
|
@@ -13,15 +12,6 @@ import init, {
|
|
|
13
12
|
goldilocks_fields_to_hex,
|
|
14
13
|
goldilocks_modulus,
|
|
15
14
|
goldilocks_reduce,
|
|
16
|
-
schnorr_keygen,
|
|
17
|
-
schnorr_pubkey,
|
|
18
|
-
schnorr_sign_tx,
|
|
19
|
-
schnorr_verify_tx,
|
|
20
|
-
schnorr_pk_hash,
|
|
21
|
-
schnorr_pk_hash_hex,
|
|
22
|
-
schnorr_pk_encode,
|
|
23
|
-
schnorr_sign_cpk,
|
|
24
|
-
compute_tx_msg_hash,
|
|
25
15
|
amount_split,
|
|
26
16
|
compute_address_hash,
|
|
27
17
|
} from '../dist/web/rolly_wasm_signer.js';
|
|
@@ -41,7 +31,6 @@ const fns = {
|
|
|
41
31
|
poseidon2_two_to_one: guard(poseidon2_two_to_one),
|
|
42
32
|
derive_session_key: guard(derive_session_key),
|
|
43
33
|
session_public_key: guard(session_public_key),
|
|
44
|
-
create_bet_auth: guard(create_bet_auth),
|
|
45
34
|
compute_server_seed_hash: guard(compute_server_seed_hash),
|
|
46
35
|
seed_hash_truncated: guard(seed_hash_truncated),
|
|
47
36
|
string_to_user_seed: guard(string_to_user_seed),
|
|
@@ -50,15 +39,6 @@ const fns = {
|
|
|
50
39
|
goldilocks_fields_to_hex: guard(goldilocks_fields_to_hex),
|
|
51
40
|
goldilocks_modulus: guard(goldilocks_modulus),
|
|
52
41
|
goldilocks_reduce: guard(goldilocks_reduce),
|
|
53
|
-
schnorr_keygen: guard(schnorr_keygen),
|
|
54
|
-
schnorr_pubkey: guard(schnorr_pubkey),
|
|
55
|
-
schnorr_sign_tx: guard(schnorr_sign_tx),
|
|
56
|
-
schnorr_verify_tx: guard(schnorr_verify_tx),
|
|
57
|
-
schnorr_pk_hash: guard(schnorr_pk_hash),
|
|
58
|
-
schnorr_pk_hash_hex: guard(schnorr_pk_hash_hex),
|
|
59
|
-
schnorr_pk_encode: guard(schnorr_pk_encode),
|
|
60
|
-
schnorr_sign_cpk: guard(schnorr_sign_cpk),
|
|
61
|
-
compute_tx_msg_hash: guard(compute_tx_msg_hash),
|
|
62
42
|
amount_split: guard(amount_split),
|
|
63
43
|
compute_address_hash: guard(compute_address_hash),
|
|
64
44
|
};
|