@buildonspark/spark-sdk 0.0.15 → 0.0.17

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.
Files changed (136) hide show
  1. package/dist/services/config.d.ts +1 -0
  2. package/dist/services/config.js +4 -1
  3. package/dist/services/config.js.map +1 -1
  4. package/dist/services/wallet-config.d.ts +2 -0
  5. package/dist/services/wallet-config.js +2 -0
  6. package/dist/services/wallet-config.js.map +1 -1
  7. package/dist/signer/signer.js +4 -3
  8. package/dist/signer/signer.js.map +1 -1
  9. package/dist/spark-sdk.d.ts +4 -4
  10. package/dist/spark-sdk.js +26 -10
  11. package/dist/spark-sdk.js.map +1 -1
  12. package/package.json +4 -3
  13. package/src/examples/example.js +247 -0
  14. package/src/examples/example.ts +207 -0
  15. package/src/graphql/client.ts +282 -0
  16. package/src/graphql/mutations/CompleteCoopExit.ts +19 -0
  17. package/src/graphql/mutations/CompleteLeavesSwap.ts +17 -0
  18. package/src/graphql/mutations/RequestCoopExit.ts +20 -0
  19. package/src/graphql/mutations/RequestLightningReceive.ts +26 -0
  20. package/src/graphql/mutations/RequestLightningSend.ts +17 -0
  21. package/src/graphql/mutations/RequestSwapLeaves.ts +24 -0
  22. package/src/graphql/objects/BitcoinNetwork.ts +22 -0
  23. package/src/graphql/objects/CompleteCoopExitInput.ts +41 -0
  24. package/src/graphql/objects/CompleteCoopExitOutput.ts +45 -0
  25. package/src/graphql/objects/CompleteLeavesSwapInput.ts +45 -0
  26. package/src/graphql/objects/CompleteLeavesSwapOutput.ts +45 -0
  27. package/src/graphql/objects/CompleteSeedReleaseInput.ts +41 -0
  28. package/src/graphql/objects/CompleteSeedReleaseOutput.ts +43 -0
  29. package/src/graphql/objects/Connection.ts +90 -0
  30. package/src/graphql/objects/CoopExitFeeEstimateInput.ts +41 -0
  31. package/src/graphql/objects/CoopExitFeeEstimateOutput.ts +52 -0
  32. package/src/graphql/objects/CoopExitRequest.ts +118 -0
  33. package/src/graphql/objects/CurrencyAmount.ts +74 -0
  34. package/src/graphql/objects/CurrencyUnit.ts +32 -0
  35. package/src/graphql/objects/Entity.ts +202 -0
  36. package/src/graphql/objects/GetChallengeInput.ts +37 -0
  37. package/src/graphql/objects/GetChallengeOutput.ts +43 -0
  38. package/src/graphql/objects/Invoice.ts +83 -0
  39. package/src/graphql/objects/Leaf.ts +59 -0
  40. package/src/graphql/objects/LeavesSwapFeeEstimateInput.ts +37 -0
  41. package/src/graphql/objects/LeavesSwapFeeEstimateOutput.ts +52 -0
  42. package/src/graphql/objects/LeavesSwapRequest.ts +192 -0
  43. package/src/graphql/objects/LightningReceiveFeeEstimateInput.ts +41 -0
  44. package/src/graphql/objects/LightningReceiveFeeEstimateOutput.ts +52 -0
  45. package/src/graphql/objects/LightningReceiveRequest.ts +147 -0
  46. package/src/graphql/objects/LightningReceiveRequestStatus.ts +34 -0
  47. package/src/graphql/objects/LightningSendFeeEstimateInput.ts +37 -0
  48. package/src/graphql/objects/LightningSendFeeEstimateOutput.ts +52 -0
  49. package/src/graphql/objects/LightningSendRequest.ts +134 -0
  50. package/src/graphql/objects/LightningSendRequestStatus.ts +28 -0
  51. package/src/graphql/objects/NotifyReceiverTransferInput.ts +41 -0
  52. package/src/graphql/objects/PageInfo.ts +58 -0
  53. package/src/graphql/objects/Provider.ts +41 -0
  54. package/src/graphql/objects/RequestCoopExitInput.ts +41 -0
  55. package/src/graphql/objects/RequestCoopExitOutput.ts +45 -0
  56. package/src/graphql/objects/RequestLeavesSwapInput.ts +55 -0
  57. package/src/graphql/objects/RequestLeavesSwapOutput.ts +45 -0
  58. package/src/graphql/objects/RequestLightningReceiveInput.ts +58 -0
  59. package/src/graphql/objects/RequestLightningReceiveOutput.ts +45 -0
  60. package/src/graphql/objects/RequestLightningSendInput.ts +41 -0
  61. package/src/graphql/objects/RequestLightningSendOutput.ts +45 -0
  62. package/src/graphql/objects/SparkCoopExitRequestStatus.ts +20 -0
  63. package/src/graphql/objects/SparkLeavesSwapRequestStatus.ts +20 -0
  64. package/src/graphql/objects/SparkTransferToLeavesConnection.ts +79 -0
  65. package/src/graphql/objects/SparkWalletUser.ts +86 -0
  66. package/src/graphql/objects/StartSeedReleaseInput.ts +37 -0
  67. package/src/graphql/objects/SwapLeaf.ts +53 -0
  68. package/src/graphql/objects/Transfer.ts +98 -0
  69. package/src/graphql/objects/UserLeafInput.ts +28 -0
  70. package/src/graphql/objects/VerifyChallengeInput.ts +51 -0
  71. package/src/graphql/objects/VerifyChallengeOutput.ts +43 -0
  72. package/src/graphql/objects/WalletUserIdentityPublicKeyInput.ts +37 -0
  73. package/src/graphql/objects/WalletUserIdentityPublicKeyOutput.ts +43 -0
  74. package/src/graphql/objects/index.ts +67 -0
  75. package/src/graphql/queries/CoopExitFeeEstimate.ts +18 -0
  76. package/src/graphql/queries/CurrentUser.ts +10 -0
  77. package/src/graphql/queries/LightningReceiveFeeEstimate.ts +18 -0
  78. package/src/graphql/queries/LightningSendFeeEstimate.ts +16 -0
  79. package/src/proto/common.ts +431 -0
  80. package/src/proto/google/protobuf/descriptor.ts +6625 -0
  81. package/src/proto/google/protobuf/duration.ts +197 -0
  82. package/src/proto/google/protobuf/empty.ts +83 -0
  83. package/src/proto/google/protobuf/timestamp.ts +226 -0
  84. package/src/proto/mock.ts +151 -0
  85. package/src/proto/spark.ts +12727 -0
  86. package/src/proto/spark_authn.ts +673 -0
  87. package/src/proto/validate/validate.ts +6047 -0
  88. package/src/services/config.ts +75 -0
  89. package/src/services/connection.ts +264 -0
  90. package/src/services/coop-exit.ts +190 -0
  91. package/src/services/deposit.ts +327 -0
  92. package/src/services/lightning.ts +341 -0
  93. package/src/services/lrc20.ts +42 -0
  94. package/src/services/token-transactions.ts +499 -0
  95. package/src/services/transfer.ts +1188 -0
  96. package/src/services/tree-creation.ts +618 -0
  97. package/src/services/wallet-config.ts +143 -0
  98. package/src/signer/signer.ts +532 -0
  99. package/src/spark-sdk.ts +1665 -0
  100. package/src/tests/adaptor-signature.test.ts +64 -0
  101. package/src/tests/bitcoin.test.ts +122 -0
  102. package/src/tests/coop-exit.test.ts +233 -0
  103. package/src/tests/deposit.test.ts +98 -0
  104. package/src/tests/keys.test.ts +82 -0
  105. package/src/tests/lightning.test.ts +307 -0
  106. package/src/tests/secret-sharing.test.ts +63 -0
  107. package/src/tests/swap.test.ts +252 -0
  108. package/src/tests/test-util.ts +92 -0
  109. package/src/tests/tokens.test.ts +47 -0
  110. package/src/tests/transfer.test.ts +371 -0
  111. package/src/tests/tree-creation.test.ts +56 -0
  112. package/src/tests/utils/spark-testing-wallet.ts +37 -0
  113. package/src/tests/utils/test-faucet.ts +257 -0
  114. package/src/types/grpc.ts +8 -0
  115. package/src/types/index.ts +3 -0
  116. package/src/utils/adaptor-signature.ts +189 -0
  117. package/src/utils/bitcoin.ts +138 -0
  118. package/src/utils/crypto.ts +14 -0
  119. package/src/utils/index.ts +12 -0
  120. package/src/utils/keys.ts +92 -0
  121. package/src/utils/mempool.ts +42 -0
  122. package/src/utils/network.ts +70 -0
  123. package/src/utils/proof.ts +17 -0
  124. package/src/utils/response-validation.ts +26 -0
  125. package/src/utils/secret-sharing.ts +263 -0
  126. package/src/utils/signing.ts +96 -0
  127. package/src/utils/token-hashing.ts +163 -0
  128. package/src/utils/token-keyshares.ts +31 -0
  129. package/src/utils/token-transactions.ts +71 -0
  130. package/src/utils/transaction.ts +45 -0
  131. package/src/utils/wasm-wrapper.ts +57 -0
  132. package/src/utils/wasm.ts +154 -0
  133. package/src/wasm/spark_bindings.d.ts +208 -0
  134. package/src/wasm/spark_bindings.js +1161 -0
  135. package/src/wasm/spark_bindings_bg.wasm +0 -0
  136. package/src/wasm/spark_bindings_bg.wasm.d.ts +136 -0
@@ -0,0 +1,208 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export function frost_nonce(key_package: KeyPackage): NonceResult;
4
+ export function wasm_sign_frost(msg: Uint8Array, key_package: KeyPackage, nonce: SigningNonce, self_commitment: SigningCommitment, statechain_commitments: any, adaptor_public_key?: Uint8Array | null): Uint8Array;
5
+ export function wasm_aggregate_frost(msg: Uint8Array, statechain_commitments: any, self_commitment: SigningCommitment, statechain_signatures: any, self_signature: Uint8Array, statechain_public_keys: any, self_public_key: Uint8Array, verifying_key: Uint8Array, adaptor_public_key?: Uint8Array | null): Uint8Array;
6
+ export function construct_node_tx(tx: Uint8Array, vout: number, address: string, locktime: number): TransactionResult;
7
+ export function construct_refund_tx(tx: Uint8Array, vout: number, pubkey: Uint8Array, network: string, locktime: number): TransactionResult;
8
+ export function construct_split_tx(tx: Uint8Array, vout: number, addresses: string[], locktime: number): TransactionResult;
9
+ export function create_dummy_tx(address: string, amount_sats: bigint): DummyTx;
10
+ export function encrypt_ecies(msg: Uint8Array, public_key_bytes: Uint8Array): Uint8Array;
11
+ export function decrypt_ecies(encrypted_msg: Uint8Array, private_key_bytes: Uint8Array): Uint8Array;
12
+ export class DummyTx {
13
+ private constructor();
14
+ free(): void;
15
+ tx: Uint8Array;
16
+ txid: string;
17
+ }
18
+ export class KeyPackage {
19
+ free(): void;
20
+ constructor(secret_key: Uint8Array, public_key: Uint8Array, verifying_key: Uint8Array);
21
+ secret_key: Uint8Array;
22
+ public_key: Uint8Array;
23
+ verifying_key: Uint8Array;
24
+ }
25
+ export class NonceResult {
26
+ private constructor();
27
+ free(): void;
28
+ nonce: SigningNonce;
29
+ commitment: SigningCommitment;
30
+ }
31
+ export class SigningCommitment {
32
+ free(): void;
33
+ constructor(hiding: Uint8Array, binding: Uint8Array);
34
+ hiding: Uint8Array;
35
+ binding: Uint8Array;
36
+ }
37
+ export class SigningNonce {
38
+ free(): void;
39
+ constructor(hiding: Uint8Array, binding: Uint8Array);
40
+ hiding: Uint8Array;
41
+ binding: Uint8Array;
42
+ }
43
+ export class TransactionResult {
44
+ private constructor();
45
+ free(): void;
46
+ tx: Uint8Array;
47
+ sighash: Uint8Array;
48
+ }
49
+
50
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
51
+
52
+ export interface InitOutput {
53
+ readonly memory: WebAssembly.Memory;
54
+ readonly uniffi_spark_frost_checksum_func_aggregate_frost: () => number;
55
+ readonly uniffi_spark_frost_checksum_func_construct_node_tx: () => number;
56
+ readonly uniffi_spark_frost_checksum_func_construct_refund_tx: () => number;
57
+ readonly uniffi_spark_frost_checksum_func_construct_split_tx: () => number;
58
+ readonly uniffi_spark_frost_checksum_func_create_dummy_tx: () => number;
59
+ readonly uniffi_spark_frost_checksum_func_decrypt_ecies: () => number;
60
+ readonly uniffi_spark_frost_checksum_func_encrypt_ecies: () => number;
61
+ readonly uniffi_spark_frost_checksum_func_frost_nonce: () => number;
62
+ readonly uniffi_spark_frost_checksum_func_sign_frost: () => number;
63
+ readonly uniffi_spark_frost_checksum_func_validate_signature_share: () => number;
64
+ readonly ffi_spark_frost_uniffi_contract_version: () => number;
65
+ readonly ffi_spark_frost_rustbuffer_alloc: (a: number, b: bigint, c: number) => void;
66
+ readonly ffi_spark_frost_rustbuffer_from_bytes: (a: number, b: number, c: number, d: number) => void;
67
+ readonly ffi_spark_frost_rustbuffer_free: (a: bigint, b: bigint, c: number, d: number, e: number) => void;
68
+ readonly ffi_spark_frost_rustbuffer_reserve: (a: number, b: bigint, c: bigint, d: number, e: number, f: bigint, g: number) => void;
69
+ readonly ffi_spark_frost_rust_future_poll_u8: (a: bigint, b: number, c: bigint) => void;
70
+ readonly ffi_spark_frost_rust_future_cancel_u8: (a: bigint) => void;
71
+ readonly ffi_spark_frost_rust_future_complete_u8: (a: bigint, b: number) => number;
72
+ readonly ffi_spark_frost_rust_future_free_u8: (a: bigint) => void;
73
+ readonly ffi_spark_frost_rust_future_poll_i8: (a: bigint, b: number, c: bigint) => void;
74
+ readonly ffi_spark_frost_rust_future_cancel_i8: (a: bigint) => void;
75
+ readonly ffi_spark_frost_rust_future_complete_i8: (a: bigint, b: number) => number;
76
+ readonly ffi_spark_frost_rust_future_free_i8: (a: bigint) => void;
77
+ readonly ffi_spark_frost_rust_future_poll_u16: (a: bigint, b: number, c: bigint) => void;
78
+ readonly ffi_spark_frost_rust_future_cancel_u16: (a: bigint) => void;
79
+ readonly ffi_spark_frost_rust_future_complete_u16: (a: bigint, b: number) => number;
80
+ readonly ffi_spark_frost_rust_future_free_u16: (a: bigint) => void;
81
+ readonly ffi_spark_frost_rust_future_poll_i16: (a: bigint, b: number, c: bigint) => void;
82
+ readonly ffi_spark_frost_rust_future_cancel_i16: (a: bigint) => void;
83
+ readonly ffi_spark_frost_rust_future_complete_i16: (a: bigint, b: number) => number;
84
+ readonly ffi_spark_frost_rust_future_free_i16: (a: bigint) => void;
85
+ readonly ffi_spark_frost_rust_future_poll_u32: (a: bigint, b: number, c: bigint) => void;
86
+ readonly ffi_spark_frost_rust_future_cancel_u32: (a: bigint) => void;
87
+ readonly ffi_spark_frost_rust_future_complete_u32: (a: bigint, b: number) => number;
88
+ readonly ffi_spark_frost_rust_future_free_u32: (a: bigint) => void;
89
+ readonly ffi_spark_frost_rust_future_poll_i32: (a: bigint, b: number, c: bigint) => void;
90
+ readonly ffi_spark_frost_rust_future_cancel_i32: (a: bigint) => void;
91
+ readonly ffi_spark_frost_rust_future_complete_i32: (a: bigint, b: number) => number;
92
+ readonly ffi_spark_frost_rust_future_free_i32: (a: bigint) => void;
93
+ readonly ffi_spark_frost_rust_future_poll_u64: (a: bigint, b: number, c: bigint) => void;
94
+ readonly ffi_spark_frost_rust_future_cancel_u64: (a: bigint) => void;
95
+ readonly ffi_spark_frost_rust_future_complete_u64: (a: bigint, b: number) => bigint;
96
+ readonly ffi_spark_frost_rust_future_free_u64: (a: bigint) => void;
97
+ readonly ffi_spark_frost_rust_future_poll_i64: (a: bigint, b: number, c: bigint) => void;
98
+ readonly ffi_spark_frost_rust_future_cancel_i64: (a: bigint) => void;
99
+ readonly ffi_spark_frost_rust_future_complete_i64: (a: bigint, b: number) => bigint;
100
+ readonly ffi_spark_frost_rust_future_free_i64: (a: bigint) => void;
101
+ readonly ffi_spark_frost_rust_future_poll_f32: (a: bigint, b: number, c: bigint) => void;
102
+ readonly ffi_spark_frost_rust_future_cancel_f32: (a: bigint) => void;
103
+ readonly ffi_spark_frost_rust_future_complete_f32: (a: bigint, b: number) => number;
104
+ readonly ffi_spark_frost_rust_future_free_f32: (a: bigint) => void;
105
+ readonly ffi_spark_frost_rust_future_poll_f64: (a: bigint, b: number, c: bigint) => void;
106
+ readonly ffi_spark_frost_rust_future_cancel_f64: (a: bigint) => void;
107
+ readonly ffi_spark_frost_rust_future_complete_f64: (a: bigint, b: number) => number;
108
+ readonly ffi_spark_frost_rust_future_free_f64: (a: bigint) => void;
109
+ readonly ffi_spark_frost_rust_future_poll_pointer: (a: bigint, b: number, c: bigint) => void;
110
+ readonly ffi_spark_frost_rust_future_cancel_pointer: (a: bigint) => void;
111
+ readonly ffi_spark_frost_rust_future_complete_pointer: (a: bigint, b: number) => number;
112
+ readonly ffi_spark_frost_rust_future_free_pointer: (a: bigint) => void;
113
+ readonly ffi_spark_frost_rust_future_poll_rust_buffer: (a: bigint, b: number, c: bigint) => void;
114
+ readonly ffi_spark_frost_rust_future_cancel_rust_buffer: (a: bigint) => void;
115
+ readonly ffi_spark_frost_rust_future_complete_rust_buffer: (a: number, b: bigint, c: number) => void;
116
+ readonly ffi_spark_frost_rust_future_free_rust_buffer: (a: bigint) => void;
117
+ readonly ffi_spark_frost_rust_future_poll_void: (a: bigint, b: number, c: bigint) => void;
118
+ readonly ffi_spark_frost_rust_future_cancel_void: (a: bigint) => void;
119
+ readonly ffi_spark_frost_rust_future_complete_void: (a: bigint, b: number) => void;
120
+ readonly ffi_spark_frost_rust_future_free_void: (a: bigint) => void;
121
+ readonly uniffi_spark_frost_fn_func_aggregate_frost: (a: number, b: bigint, c: bigint, d: number, e: number, f: bigint, g: bigint, h: number, i: number, j: bigint, k: bigint, l: number, m: number, n: bigint, o: bigint, p: number, q: number, r: bigint, s: bigint, t: number, u: number, v: bigint, w: bigint, x: number, y: number, z: bigint, a1: bigint, b1: number, c1: number, d1: bigint, e1: bigint, f1: number, g1: number, h1: bigint, i1: bigint, j1: number, k1: number, l1: number) => void;
122
+ readonly uniffi_spark_frost_fn_func_construct_node_tx: (a: number, b: bigint, c: bigint, d: number, e: number, f: number, g: bigint, h: bigint, i: number, j: number, k: number, l: number) => void;
123
+ readonly uniffi_spark_frost_fn_func_construct_refund_tx: (a: number, b: bigint, c: bigint, d: number, e: number, f: number, g: bigint, h: bigint, i: number, j: number, k: bigint, l: bigint, m: number, n: number, o: number, p: number) => void;
124
+ readonly uniffi_spark_frost_fn_func_construct_split_tx: (a: number, b: bigint, c: bigint, d: number, e: number, f: number, g: bigint, h: bigint, i: number, j: number, k: number, l: number) => void;
125
+ readonly uniffi_spark_frost_fn_func_create_dummy_tx: (a: number, b: bigint, c: bigint, d: number, e: number, f: bigint, g: number) => void;
126
+ readonly uniffi_spark_frost_fn_func_decrypt_ecies: (a: number, b: bigint, c: bigint, d: number, e: number, f: bigint, g: bigint, h: number, i: number, j: number) => void;
127
+ readonly uniffi_spark_frost_fn_func_encrypt_ecies: (a: number, b: bigint, c: bigint, d: number, e: number, f: bigint, g: bigint, h: number, i: number, j: number) => void;
128
+ readonly uniffi_spark_frost_fn_func_frost_nonce: (a: number, b: bigint, c: bigint, d: number, e: number, f: number) => void;
129
+ readonly uniffi_spark_frost_fn_func_sign_frost: (a: number, b: bigint, c: bigint, d: number, e: number, f: bigint, g: bigint, h: number, i: number, j: bigint, k: bigint, l: number, m: number, n: bigint, o: bigint, p: number, q: number, r: bigint, s: bigint, t: number, u: number, v: bigint, w: bigint, x: number, y: number, z: number) => void;
130
+ readonly uniffi_spark_frost_fn_func_validate_signature_share: (a: bigint, b: bigint, c: number, d: number, e: bigint, f: bigint, g: number, h: number, i: bigint, j: bigint, k: number, l: number, m: bigint, n: bigint, o: number, p: number, q: bigint, r: bigint, s: number, t: number, u: bigint, v: bigint, w: number, x: number, y: number) => number;
131
+ readonly __wbg_signingnonce_free: (a: number, b: number) => void;
132
+ readonly __wbg_signingcommitment_free: (a: number, b: number) => void;
133
+ readonly signingcommitment_new: (a: number, b: number, c: number, d: number) => number;
134
+ readonly __wbg_nonceresult_free: (a: number, b: number) => void;
135
+ readonly __wbg_get_nonceresult_nonce: (a: number) => number;
136
+ readonly __wbg_set_nonceresult_nonce: (a: number, b: number) => void;
137
+ readonly __wbg_get_nonceresult_commitment: (a: number) => number;
138
+ readonly __wbg_set_nonceresult_commitment: (a: number, b: number) => void;
139
+ readonly __wbg_keypackage_free: (a: number, b: number) => void;
140
+ readonly __wbg_get_keypackage_public_key: (a: number) => [number, number];
141
+ readonly __wbg_get_keypackage_verifying_key: (a: number) => [number, number];
142
+ readonly __wbg_set_keypackage_verifying_key: (a: number, b: number, c: number) => void;
143
+ readonly keypackage_new: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
144
+ readonly frost_nonce: (a: number) => [number, number, number];
145
+ readonly wasm_sign_frost: (a: number, b: number, c: number, d: number, e: number, f: any, g: number, h: number) => [number, number, number, number];
146
+ readonly wasm_aggregate_frost: (a: number, b: number, c: any, d: number, e: any, f: number, g: number, h: any, i: number, j: number, k: number, l: number, m: number, n: number) => [number, number, number, number];
147
+ readonly __wbg_transactionresult_free: (a: number, b: number) => void;
148
+ readonly construct_node_tx: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
149
+ readonly construct_refund_tx: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
150
+ readonly construct_split_tx: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
151
+ readonly __wbg_dummytx_free: (a: number, b: number) => void;
152
+ readonly __wbg_get_dummytx_tx: (a: number) => [number, number];
153
+ readonly __wbg_set_dummytx_tx: (a: number, b: number, c: number) => void;
154
+ readonly __wbg_get_dummytx_txid: (a: number) => [number, number];
155
+ readonly __wbg_set_dummytx_txid: (a: number, b: number, c: number) => void;
156
+ readonly create_dummy_tx: (a: number, b: number, c: bigint) => [number, number, number];
157
+ readonly encrypt_ecies: (a: number, b: number, c: number, d: number) => [number, number, number, number];
158
+ readonly decrypt_ecies: (a: number, b: number, c: number, d: number) => [number, number, number, number];
159
+ readonly signingnonce_new: (a: number, b: number, c: number, d: number) => number;
160
+ readonly __wbg_set_signingnonce_hiding: (a: number, b: number, c: number) => void;
161
+ readonly __wbg_set_signingnonce_binding: (a: number, b: number, c: number) => void;
162
+ readonly __wbg_set_signingcommitment_hiding: (a: number, b: number, c: number) => void;
163
+ readonly __wbg_set_signingcommitment_binding: (a: number, b: number, c: number) => void;
164
+ readonly __wbg_set_transactionresult_tx: (a: number, b: number, c: number) => void;
165
+ readonly __wbg_set_transactionresult_sighash: (a: number, b: number, c: number) => void;
166
+ readonly __wbg_set_keypackage_secret_key: (a: number, b: number, c: number) => void;
167
+ readonly __wbg_set_keypackage_public_key: (a: number, b: number, c: number) => void;
168
+ readonly __wbg_get_signingnonce_hiding: (a: number) => [number, number];
169
+ readonly __wbg_get_signingnonce_binding: (a: number) => [number, number];
170
+ readonly __wbg_get_signingcommitment_hiding: (a: number) => [number, number];
171
+ readonly __wbg_get_signingcommitment_binding: (a: number) => [number, number];
172
+ readonly __wbg_get_transactionresult_tx: (a: number) => [number, number];
173
+ readonly __wbg_get_transactionresult_sighash: (a: number) => [number, number];
174
+ readonly __wbg_get_keypackage_secret_key: (a: number) => [number, number];
175
+ readonly rustsecp256k1_v0_10_0_context_create: (a: number) => number;
176
+ readonly rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
177
+ readonly rustsecp256k1_v0_10_0_default_illegal_callback_fn: (a: number, b: number) => void;
178
+ readonly rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
179
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
180
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
181
+ readonly __wbindgen_exn_store: (a: number) => void;
182
+ readonly __externref_table_alloc: () => number;
183
+ readonly __wbindgen_export_4: WebAssembly.Table;
184
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
185
+ readonly __externref_table_dealloc: (a: number) => void;
186
+ readonly __wbindgen_start: () => void;
187
+ }
188
+
189
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
190
+ /**
191
+ * Instantiates the given `module`, which can either be bytes or
192
+ * a precompiled `WebAssembly.Module`.
193
+ *
194
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
195
+ *
196
+ * @returns {InitOutput}
197
+ */
198
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
199
+
200
+ /**
201
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
202
+ * for everything else, calls `WebAssembly.instantiate` directly.
203
+ *
204
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
205
+ *
206
+ * @returns {Promise<InitOutput>}
207
+ */
208
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;