@utexo/rgb-lib-linux-x64 0.3.0-beta.11.vss.backup → 0.3.0-beta.12
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/package.json
CHANGED
|
@@ -33,6 +33,8 @@ void free_invoice(COpaqueStruct obj);
|
|
|
33
33
|
|
|
34
34
|
void free_online(COpaqueStruct obj);
|
|
35
35
|
|
|
36
|
+
void free_vss_backup_client(COpaqueStruct obj);
|
|
37
|
+
|
|
36
38
|
void free_wallet(COpaqueStruct obj);
|
|
37
39
|
|
|
38
40
|
CResult rgblib_backup(const COpaqueStruct *wallet, const char *backup_path, const char *password);
|
|
@@ -46,6 +48,8 @@ CResultString rgblib_blind_receive(const COpaqueStruct *wallet,
|
|
|
46
48
|
const char *transport_endpoints,
|
|
47
49
|
const char *min_confirmations);
|
|
48
50
|
|
|
51
|
+
CResultString rgblib_configure_vss_backup(const COpaqueStruct *wallet, const char *config_json);
|
|
52
|
+
|
|
49
53
|
CResultString rgblib_create_utxos(const COpaqueStruct *wallet,
|
|
50
54
|
const COpaqueStruct *online,
|
|
51
55
|
bool up_to,
|
|
@@ -67,6 +71,18 @@ CResultString rgblib_create_utxos_end(const COpaqueStruct *wallet,
|
|
|
67
71
|
const char *signed_psbt,
|
|
68
72
|
bool skip_sync);
|
|
69
73
|
|
|
74
|
+
CResultString rgblib_delete_transfers(const COpaqueStruct *wallet,
|
|
75
|
+
const char *batch_transfer_idx_opt,
|
|
76
|
+
bool no_asset_only);
|
|
77
|
+
|
|
78
|
+
CResultString rgblib_disable_vss_auto_backup(const COpaqueStruct *wallet);
|
|
79
|
+
|
|
80
|
+
CResultString rgblib_fail_transfers(const COpaqueStruct *wallet,
|
|
81
|
+
const COpaqueStruct *online,
|
|
82
|
+
const char *batch_transfer_idx_opt,
|
|
83
|
+
bool no_asset_only,
|
|
84
|
+
bool skip_sync);
|
|
85
|
+
|
|
70
86
|
CResultString rgblib_finalize_psbt(const COpaqueStruct *wallet, const char *signed_psbt);
|
|
71
87
|
|
|
72
88
|
CResultString rgblib_generate_keys(const char *bitcoin_network);
|
|
@@ -143,6 +159,8 @@ CResultString rgblib_list_unspents(const COpaqueStruct *wallet,
|
|
|
143
159
|
bool settled_only,
|
|
144
160
|
bool skip_sync);
|
|
145
161
|
|
|
162
|
+
CResult rgblib_new_vss_backup_client(const char *config_json);
|
|
163
|
+
|
|
146
164
|
CResult rgblib_new_wallet(const char *wallet_data);
|
|
147
165
|
|
|
148
166
|
CResultString rgblib_refresh(const COpaqueStruct *wallet,
|
|
@@ -155,6 +173,8 @@ CResult rgblib_restore_backup(const char *backup_path,
|
|
|
155
173
|
const char *password,
|
|
156
174
|
const char *target_dir);
|
|
157
175
|
|
|
176
|
+
CResultString rgblib_restore_from_vss(const char *config_json, const char *target_dir);
|
|
177
|
+
|
|
158
178
|
CResultString rgblib_restore_keys(const char *bitcoin_network, const char *mnemonic);
|
|
159
179
|
|
|
160
180
|
CResultString rgblib_send(const COpaqueStruct *wallet,
|
|
@@ -179,6 +199,18 @@ CResultString rgblib_send_btc(const COpaqueStruct *wallet,
|
|
|
179
199
|
const char *fee_rate,
|
|
180
200
|
bool skip_sync);
|
|
181
201
|
|
|
202
|
+
CResultString rgblib_send_btc_begin(const COpaqueStruct *wallet,
|
|
203
|
+
const COpaqueStruct *online,
|
|
204
|
+
const char *address,
|
|
205
|
+
const char *amount,
|
|
206
|
+
const char *fee_rate,
|
|
207
|
+
bool skip_sync);
|
|
208
|
+
|
|
209
|
+
CResultString rgblib_send_btc_end(const COpaqueStruct *wallet,
|
|
210
|
+
const COpaqueStruct *online,
|
|
211
|
+
const char *signed_psbt,
|
|
212
|
+
bool skip_sync);
|
|
213
|
+
|
|
182
214
|
CResultString rgblib_send_end(const COpaqueStruct *wallet,
|
|
183
215
|
const COpaqueStruct *online,
|
|
184
216
|
const char *signed_psbt,
|
|
@@ -188,6 +220,18 @@ CResultString rgblib_sign_psbt(const COpaqueStruct *wallet, const char *unsigned
|
|
|
188
220
|
|
|
189
221
|
CResultString rgblib_sync(const COpaqueStruct *wallet, const COpaqueStruct *online);
|
|
190
222
|
|
|
223
|
+
CResultString rgblib_validate_consignment(const char *file_path,
|
|
224
|
+
const char *indexer_url,
|
|
225
|
+
const char *bitcoin_network);
|
|
226
|
+
|
|
227
|
+
CResultString rgblib_vss_backup(const COpaqueStruct *wallet, const COpaqueStruct *client);
|
|
228
|
+
|
|
229
|
+
CResultString rgblib_vss_backup_client_encryption_enabled(const COpaqueStruct *client);
|
|
230
|
+
|
|
231
|
+
CResultString rgblib_vss_backup_info(const COpaqueStruct *wallet, const COpaqueStruct *client);
|
|
232
|
+
|
|
233
|
+
CResultString rgblib_vss_delete_backup(const COpaqueStruct *client);
|
|
234
|
+
|
|
191
235
|
CResultString rgblib_witness_receive(const COpaqueStruct *wallet,
|
|
192
236
|
const char *asset_id_opt,
|
|
193
237
|
const char *assignment,
|
|
Binary file
|
package/swig_wrap.cxx
CHANGED
|
@@ -2151,6 +2151,40 @@ fail:
|
|
|
2151
2151
|
}
|
|
2152
2152
|
|
|
2153
2153
|
|
|
2154
|
+
static SwigV8ReturnValue _wrap_free_vss_backup_client(const SwigV8Arguments &args) {
|
|
2155
|
+
SWIGV8_HANDLESCOPE();
|
|
2156
|
+
|
|
2157
|
+
SWIGV8_VALUE jsresult;
|
|
2158
|
+
COpaqueStruct arg1 ;
|
|
2159
|
+
void *argp1 ;
|
|
2160
|
+
int res1 = 0 ;
|
|
2161
|
+
|
|
2162
|
+
if (args.Length() < 1 || args.Length() > 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_free_vss_backup_client.");
|
|
2163
|
+
|
|
2164
|
+
{
|
|
2165
|
+
{
|
|
2166
|
+
res1 = SWIG_ConvertPtr(args[0], &argp1, SWIGTYPE_p_COpaqueStruct, 0 );
|
|
2167
|
+
if (!SWIG_IsOK(res1)) {
|
|
2168
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "free_vss_backup_client" "', argument " "1"" of type '" "COpaqueStruct""'");
|
|
2169
|
+
}
|
|
2170
|
+
if (!argp1) {
|
|
2171
|
+
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "free_vss_backup_client" "', argument " "1"" of type '" "COpaqueStruct""'");
|
|
2172
|
+
} else {
|
|
2173
|
+
arg1 = *(reinterpret_cast< COpaqueStruct * >(argp1));
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
free_vss_backup_client(SWIG_STD_MOVE(arg1));
|
|
2178
|
+
jsresult = SWIGV8_UNDEFINED();
|
|
2179
|
+
|
|
2180
|
+
SWIGV8_RETURN(jsresult);
|
|
2181
|
+
|
|
2182
|
+
goto fail;
|
|
2183
|
+
fail:
|
|
2184
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
|
|
2154
2188
|
static SwigV8ReturnValue _wrap_free_wallet(const SwigV8Arguments &args) {
|
|
2155
2189
|
SWIGV8_HANDLESCOPE();
|
|
2156
2190
|
|
|
@@ -2374,6 +2408,56 @@ fail:
|
|
|
2374
2408
|
}
|
|
2375
2409
|
|
|
2376
2410
|
|
|
2411
|
+
static SwigV8ReturnValue _wrap_rgblib_configure_vss_backup(const SwigV8Arguments &args) {
|
|
2412
|
+
SWIGV8_HANDLESCOPE();
|
|
2413
|
+
|
|
2414
|
+
SWIGV8_VALUE jsresult;
|
|
2415
|
+
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
2416
|
+
char *arg2 = (char *) 0 ;
|
|
2417
|
+
void *argp1 = 0 ;
|
|
2418
|
+
int res1 = 0 ;
|
|
2419
|
+
int res2 ;
|
|
2420
|
+
char *buf2 = 0 ;
|
|
2421
|
+
int alloc2 = 0 ;
|
|
2422
|
+
CResultString result;
|
|
2423
|
+
|
|
2424
|
+
if (args.Length() < 2 || args.Length() > 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_configure_vss_backup.");
|
|
2425
|
+
|
|
2426
|
+
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
2427
|
+
if (!SWIG_IsOK(res1)) {
|
|
2428
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_configure_vss_backup" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
2429
|
+
}
|
|
2430
|
+
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);res2 = SWIG_AsCharPtrAndSize(args[1], &buf2, NULL, &alloc2);
|
|
2431
|
+
if (!SWIG_IsOK(res2)) {
|
|
2432
|
+
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_configure_vss_backup" "', argument " "2"" of type '" "char const *""'");
|
|
2433
|
+
}
|
|
2434
|
+
arg2 = reinterpret_cast< char * >(buf2);result = rgblib_configure_vss_backup((COpaqueStruct const *)arg1,(char const *)arg2);
|
|
2435
|
+
|
|
2436
|
+
switch ((&result)->result) {
|
|
2437
|
+
case CResultValue::Ok:
|
|
2438
|
+
if ((&result)->inner == nullptr) {
|
|
2439
|
+
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
2440
|
+
} else {
|
|
2441
|
+
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
2442
|
+
delete ((&result)->inner);
|
|
2443
|
+
}
|
|
2444
|
+
break;
|
|
2445
|
+
case CResultValue::Err:
|
|
2446
|
+
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
2447
|
+
break;
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
|
|
2451
|
+
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
|
2452
|
+
|
|
2453
|
+
SWIGV8_RETURN(jsresult);
|
|
2454
|
+
|
|
2455
|
+
goto fail;
|
|
2456
|
+
fail:
|
|
2457
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
|
|
2377
2461
|
static SwigV8ReturnValue _wrap_rgblib_create_utxos(const SwigV8Arguments &args) {
|
|
2378
2462
|
SWIGV8_HANDLESCOPE();
|
|
2379
2463
|
|
|
@@ -2640,6 +2724,179 @@ fail:
|
|
|
2640
2724
|
}
|
|
2641
2725
|
|
|
2642
2726
|
|
|
2727
|
+
static SwigV8ReturnValue _wrap_rgblib_delete_transfers(const SwigV8Arguments &args) {
|
|
2728
|
+
SWIGV8_HANDLESCOPE();
|
|
2729
|
+
|
|
2730
|
+
SWIGV8_VALUE jsresult;
|
|
2731
|
+
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
2732
|
+
char *arg2 = (char *) 0 ;
|
|
2733
|
+
bool arg3 ;
|
|
2734
|
+
void *argp1 = 0 ;
|
|
2735
|
+
int res1 = 0 ;
|
|
2736
|
+
int res2 ;
|
|
2737
|
+
char *buf2 = 0 ;
|
|
2738
|
+
int alloc2 = 0 ;
|
|
2739
|
+
bool val3 ;
|
|
2740
|
+
int ecode3 = 0 ;
|
|
2741
|
+
CResultString result;
|
|
2742
|
+
|
|
2743
|
+
if (args.Length() < 3 || args.Length() > 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_delete_transfers.");
|
|
2744
|
+
|
|
2745
|
+
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
2746
|
+
if (!SWIG_IsOK(res1)) {
|
|
2747
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_delete_transfers" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
2748
|
+
}
|
|
2749
|
+
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);res2 = SWIG_AsCharPtrAndSize(args[1], &buf2, NULL, &alloc2);
|
|
2750
|
+
if (!SWIG_IsOK(res2)) {
|
|
2751
|
+
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_delete_transfers" "', argument " "2"" of type '" "char const *""'");
|
|
2752
|
+
}
|
|
2753
|
+
arg2 = reinterpret_cast< char * >(buf2);ecode3 = SWIG_AsVal_bool(args[2], &val3);
|
|
2754
|
+
if (!SWIG_IsOK(ecode3)) {
|
|
2755
|
+
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rgblib_delete_transfers" "', argument " "3"" of type '" "bool""'");
|
|
2756
|
+
}
|
|
2757
|
+
arg3 = static_cast< bool >(val3);result = rgblib_delete_transfers((COpaqueStruct const *)arg1,(char const *)arg2,arg3);
|
|
2758
|
+
|
|
2759
|
+
switch ((&result)->result) {
|
|
2760
|
+
case CResultValue::Ok:
|
|
2761
|
+
if ((&result)->inner == nullptr) {
|
|
2762
|
+
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
2763
|
+
} else {
|
|
2764
|
+
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
2765
|
+
delete ((&result)->inner);
|
|
2766
|
+
}
|
|
2767
|
+
break;
|
|
2768
|
+
case CResultValue::Err:
|
|
2769
|
+
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
2770
|
+
break;
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
|
|
2774
|
+
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
|
2775
|
+
|
|
2776
|
+
|
|
2777
|
+
SWIGV8_RETURN(jsresult);
|
|
2778
|
+
|
|
2779
|
+
goto fail;
|
|
2780
|
+
fail:
|
|
2781
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2784
|
+
|
|
2785
|
+
static SwigV8ReturnValue _wrap_rgblib_disable_vss_auto_backup(const SwigV8Arguments &args) {
|
|
2786
|
+
SWIGV8_HANDLESCOPE();
|
|
2787
|
+
|
|
2788
|
+
SWIGV8_VALUE jsresult;
|
|
2789
|
+
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
2790
|
+
void *argp1 = 0 ;
|
|
2791
|
+
int res1 = 0 ;
|
|
2792
|
+
CResultString result;
|
|
2793
|
+
|
|
2794
|
+
if (args.Length() < 1 || args.Length() > 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_disable_vss_auto_backup.");
|
|
2795
|
+
|
|
2796
|
+
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
2797
|
+
if (!SWIG_IsOK(res1)) {
|
|
2798
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_disable_vss_auto_backup" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
2799
|
+
}
|
|
2800
|
+
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);result = rgblib_disable_vss_auto_backup((COpaqueStruct const *)arg1);
|
|
2801
|
+
|
|
2802
|
+
switch ((&result)->result) {
|
|
2803
|
+
case CResultValue::Ok:
|
|
2804
|
+
if ((&result)->inner == nullptr) {
|
|
2805
|
+
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
2806
|
+
} else {
|
|
2807
|
+
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
2808
|
+
delete ((&result)->inner);
|
|
2809
|
+
}
|
|
2810
|
+
break;
|
|
2811
|
+
case CResultValue::Err:
|
|
2812
|
+
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
2813
|
+
break;
|
|
2814
|
+
}
|
|
2815
|
+
|
|
2816
|
+
|
|
2817
|
+
|
|
2818
|
+
SWIGV8_RETURN(jsresult);
|
|
2819
|
+
|
|
2820
|
+
goto fail;
|
|
2821
|
+
fail:
|
|
2822
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2825
|
+
|
|
2826
|
+
static SwigV8ReturnValue _wrap_rgblib_fail_transfers(const SwigV8Arguments &args) {
|
|
2827
|
+
SWIGV8_HANDLESCOPE();
|
|
2828
|
+
|
|
2829
|
+
SWIGV8_VALUE jsresult;
|
|
2830
|
+
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
2831
|
+
COpaqueStruct *arg2 = (COpaqueStruct *) 0 ;
|
|
2832
|
+
char *arg3 = (char *) 0 ;
|
|
2833
|
+
bool arg4 ;
|
|
2834
|
+
bool arg5 ;
|
|
2835
|
+
void *argp1 = 0 ;
|
|
2836
|
+
int res1 = 0 ;
|
|
2837
|
+
void *argp2 = 0 ;
|
|
2838
|
+
int res2 = 0 ;
|
|
2839
|
+
int res3 ;
|
|
2840
|
+
char *buf3 = 0 ;
|
|
2841
|
+
int alloc3 = 0 ;
|
|
2842
|
+
bool val4 ;
|
|
2843
|
+
int ecode4 = 0 ;
|
|
2844
|
+
bool val5 ;
|
|
2845
|
+
int ecode5 = 0 ;
|
|
2846
|
+
CResultString result;
|
|
2847
|
+
|
|
2848
|
+
if (args.Length() < 5 || args.Length() > 5) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_fail_transfers.");
|
|
2849
|
+
|
|
2850
|
+
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
2851
|
+
if (!SWIG_IsOK(res1)) {
|
|
2852
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_fail_transfers" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
2853
|
+
}
|
|
2854
|
+
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);res2 = SWIG_ConvertPtr(args[1], &argp2,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
2855
|
+
if (!SWIG_IsOK(res2)) {
|
|
2856
|
+
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_fail_transfers" "', argument " "2"" of type '" "COpaqueStruct const *""'");
|
|
2857
|
+
}
|
|
2858
|
+
arg2 = reinterpret_cast< COpaqueStruct * >(argp2);res3 = SWIG_AsCharPtrAndSize(args[2], &buf3, NULL, &alloc3);
|
|
2859
|
+
if (!SWIG_IsOK(res3)) {
|
|
2860
|
+
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rgblib_fail_transfers" "', argument " "3"" of type '" "char const *""'");
|
|
2861
|
+
}
|
|
2862
|
+
arg3 = reinterpret_cast< char * >(buf3);ecode4 = SWIG_AsVal_bool(args[3], &val4);
|
|
2863
|
+
if (!SWIG_IsOK(ecode4)) {
|
|
2864
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "rgblib_fail_transfers" "', argument " "4"" of type '" "bool""'");
|
|
2865
|
+
}
|
|
2866
|
+
arg4 = static_cast< bool >(val4);ecode5 = SWIG_AsVal_bool(args[4], &val5);
|
|
2867
|
+
if (!SWIG_IsOK(ecode5)) {
|
|
2868
|
+
SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "rgblib_fail_transfers" "', argument " "5"" of type '" "bool""'");
|
|
2869
|
+
}
|
|
2870
|
+
arg5 = static_cast< bool >(val5);result = rgblib_fail_transfers((COpaqueStruct const *)arg1,(COpaqueStruct const *)arg2,(char const *)arg3,arg4,arg5);
|
|
2871
|
+
|
|
2872
|
+
switch ((&result)->result) {
|
|
2873
|
+
case CResultValue::Ok:
|
|
2874
|
+
if ((&result)->inner == nullptr) {
|
|
2875
|
+
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
2876
|
+
} else {
|
|
2877
|
+
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
2878
|
+
delete ((&result)->inner);
|
|
2879
|
+
}
|
|
2880
|
+
break;
|
|
2881
|
+
case CResultValue::Err:
|
|
2882
|
+
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
2883
|
+
break;
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2886
|
+
|
|
2887
|
+
|
|
2888
|
+
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
|
2889
|
+
|
|
2890
|
+
|
|
2891
|
+
|
|
2892
|
+
SWIGV8_RETURN(jsresult);
|
|
2893
|
+
|
|
2894
|
+
goto fail;
|
|
2895
|
+
fail:
|
|
2896
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
2897
|
+
}
|
|
2898
|
+
|
|
2899
|
+
|
|
2643
2900
|
static SwigV8ReturnValue _wrap_rgblib_finalize_psbt(const SwigV8Arguments &args) {
|
|
2644
2901
|
SWIGV8_HANDLESCOPE();
|
|
2645
2902
|
|
|
@@ -3803,7 +4060,7 @@ fail:
|
|
|
3803
4060
|
}
|
|
3804
4061
|
|
|
3805
4062
|
|
|
3806
|
-
static SwigV8ReturnValue
|
|
4063
|
+
static SwigV8ReturnValue _wrap_rgblib_new_vss_backup_client(const SwigV8Arguments &args) {
|
|
3807
4064
|
SWIGV8_HANDLESCOPE();
|
|
3808
4065
|
|
|
3809
4066
|
SWIGV8_VALUE jsresult;
|
|
@@ -3813,13 +4070,13 @@ static SwigV8ReturnValue _wrap_rgblib_new_wallet(const SwigV8Arguments &args) {
|
|
|
3813
4070
|
int alloc1 = 0 ;
|
|
3814
4071
|
CResult result;
|
|
3815
4072
|
|
|
3816
|
-
if (args.Length() < 1 || args.Length() > 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for
|
|
4073
|
+
if (args.Length() < 1 || args.Length() > 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_new_vss_backup_client.");
|
|
3817
4074
|
|
|
3818
4075
|
res1 = SWIG_AsCharPtrAndSize(args[0], &buf1, NULL, &alloc1);
|
|
3819
4076
|
if (!SWIG_IsOK(res1)) {
|
|
3820
|
-
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "
|
|
4077
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_new_vss_backup_client" "', argument " "1"" of type '" "char const *""'");
|
|
3821
4078
|
}
|
|
3822
|
-
arg1 = reinterpret_cast< char * >(buf1);result =
|
|
4079
|
+
arg1 = reinterpret_cast< char * >(buf1);result = rgblib_new_vss_backup_client((char const *)arg1);
|
|
3823
4080
|
|
|
3824
4081
|
switch ((&result)->result) {
|
|
3825
4082
|
case CResultValue::Ok:
|
|
@@ -3840,29 +4097,66 @@ fail:
|
|
|
3840
4097
|
}
|
|
3841
4098
|
|
|
3842
4099
|
|
|
3843
|
-
static SwigV8ReturnValue
|
|
4100
|
+
static SwigV8ReturnValue _wrap_rgblib_new_wallet(const SwigV8Arguments &args) {
|
|
3844
4101
|
SWIGV8_HANDLESCOPE();
|
|
3845
4102
|
|
|
3846
4103
|
SWIGV8_VALUE jsresult;
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
char *
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
void *argp1 = 0 ;
|
|
3853
|
-
int res1 = 0 ;
|
|
3854
|
-
void *argp2 = 0 ;
|
|
3855
|
-
int res2 = 0 ;
|
|
3856
|
-
int res4 ;
|
|
3857
|
-
char *buf4 = 0 ;
|
|
3858
|
-
int alloc4 = 0 ;
|
|
3859
|
-
bool val5 ;
|
|
3860
|
-
int ecode5 = 0 ;
|
|
3861
|
-
CResultString result;
|
|
4104
|
+
char *arg1 = (char *) 0 ;
|
|
4105
|
+
int res1 ;
|
|
4106
|
+
char *buf1 = 0 ;
|
|
4107
|
+
int alloc1 = 0 ;
|
|
4108
|
+
CResult result;
|
|
3862
4109
|
|
|
3863
|
-
if (args.Length() <
|
|
4110
|
+
if (args.Length() < 1 || args.Length() > 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_new_wallet.");
|
|
3864
4111
|
|
|
3865
|
-
res1 =
|
|
4112
|
+
res1 = SWIG_AsCharPtrAndSize(args[0], &buf1, NULL, &alloc1);
|
|
4113
|
+
if (!SWIG_IsOK(res1)) {
|
|
4114
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_new_wallet" "', argument " "1"" of type '" "char const *""'");
|
|
4115
|
+
}
|
|
4116
|
+
arg1 = reinterpret_cast< char * >(buf1);result = rgblib_new_wallet((char const *)arg1);
|
|
4117
|
+
|
|
4118
|
+
switch ((&result)->result) {
|
|
4119
|
+
case CResultValue::Ok:
|
|
4120
|
+
jsresult = SWIG_NewPointerObj((new COpaqueStruct(static_cast< const COpaqueStruct& >((&result)->inner))), SWIGTYPE_p_COpaqueStruct, SWIG_POINTER_OWN | 0 );
|
|
4121
|
+
break;
|
|
4122
|
+
case CResultValue::Err:
|
|
4123
|
+
SWIG_V8_Raise((const char*) (&result)->inner.ptr);
|
|
4124
|
+
break;
|
|
4125
|
+
}
|
|
4126
|
+
|
|
4127
|
+
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
|
4128
|
+
|
|
4129
|
+
SWIGV8_RETURN(jsresult);
|
|
4130
|
+
|
|
4131
|
+
goto fail;
|
|
4132
|
+
fail:
|
|
4133
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
4134
|
+
}
|
|
4135
|
+
|
|
4136
|
+
|
|
4137
|
+
static SwigV8ReturnValue _wrap_rgblib_refresh(const SwigV8Arguments &args) {
|
|
4138
|
+
SWIGV8_HANDLESCOPE();
|
|
4139
|
+
|
|
4140
|
+
SWIGV8_VALUE jsresult;
|
|
4141
|
+
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
4142
|
+
COpaqueStruct *arg2 = (COpaqueStruct *) 0 ;
|
|
4143
|
+
char *arg3 = (char *) 0 ;
|
|
4144
|
+
char *arg4 = (char *) 0 ;
|
|
4145
|
+
bool arg5 ;
|
|
4146
|
+
void *argp1 = 0 ;
|
|
4147
|
+
int res1 = 0 ;
|
|
4148
|
+
void *argp2 = 0 ;
|
|
4149
|
+
int res2 = 0 ;
|
|
4150
|
+
int res4 ;
|
|
4151
|
+
char *buf4 = 0 ;
|
|
4152
|
+
int alloc4 = 0 ;
|
|
4153
|
+
bool val5 ;
|
|
4154
|
+
int ecode5 = 0 ;
|
|
4155
|
+
CResultString result;
|
|
4156
|
+
|
|
4157
|
+
if (args.Length() < 5 || args.Length() > 5) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_refresh.");
|
|
4158
|
+
|
|
4159
|
+
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
3866
4160
|
if (!SWIG_IsOK(res1)) {
|
|
3867
4161
|
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_refresh" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
3868
4162
|
}
|
|
@@ -3974,6 +4268,57 @@ fail:
|
|
|
3974
4268
|
}
|
|
3975
4269
|
|
|
3976
4270
|
|
|
4271
|
+
static SwigV8ReturnValue _wrap_rgblib_restore_from_vss(const SwigV8Arguments &args) {
|
|
4272
|
+
SWIGV8_HANDLESCOPE();
|
|
4273
|
+
|
|
4274
|
+
SWIGV8_VALUE jsresult;
|
|
4275
|
+
char *arg1 = (char *) 0 ;
|
|
4276
|
+
char *arg2 = (char *) 0 ;
|
|
4277
|
+
int res1 ;
|
|
4278
|
+
char *buf1 = 0 ;
|
|
4279
|
+
int alloc1 = 0 ;
|
|
4280
|
+
int res2 ;
|
|
4281
|
+
char *buf2 = 0 ;
|
|
4282
|
+
int alloc2 = 0 ;
|
|
4283
|
+
CResultString result;
|
|
4284
|
+
|
|
4285
|
+
if (args.Length() < 2 || args.Length() > 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_restore_from_vss.");
|
|
4286
|
+
|
|
4287
|
+
res1 = SWIG_AsCharPtrAndSize(args[0], &buf1, NULL, &alloc1);
|
|
4288
|
+
if (!SWIG_IsOK(res1)) {
|
|
4289
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_restore_from_vss" "', argument " "1"" of type '" "char const *""'");
|
|
4290
|
+
}
|
|
4291
|
+
arg1 = reinterpret_cast< char * >(buf1);res2 = SWIG_AsCharPtrAndSize(args[1], &buf2, NULL, &alloc2);
|
|
4292
|
+
if (!SWIG_IsOK(res2)) {
|
|
4293
|
+
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_restore_from_vss" "', argument " "2"" of type '" "char const *""'");
|
|
4294
|
+
}
|
|
4295
|
+
arg2 = reinterpret_cast< char * >(buf2);result = rgblib_restore_from_vss((char const *)arg1,(char const *)arg2);
|
|
4296
|
+
|
|
4297
|
+
switch ((&result)->result) {
|
|
4298
|
+
case CResultValue::Ok:
|
|
4299
|
+
if ((&result)->inner == nullptr) {
|
|
4300
|
+
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
4301
|
+
} else {
|
|
4302
|
+
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
4303
|
+
delete ((&result)->inner);
|
|
4304
|
+
}
|
|
4305
|
+
break;
|
|
4306
|
+
case CResultValue::Err:
|
|
4307
|
+
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
4308
|
+
break;
|
|
4309
|
+
}
|
|
4310
|
+
|
|
4311
|
+
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
|
4312
|
+
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
|
4313
|
+
|
|
4314
|
+
SWIGV8_RETURN(jsresult);
|
|
4315
|
+
|
|
4316
|
+
goto fail;
|
|
4317
|
+
fail:
|
|
4318
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
4319
|
+
}
|
|
4320
|
+
|
|
4321
|
+
|
|
3977
4322
|
static SwigV8ReturnValue _wrap_rgblib_restore_keys(const SwigV8Arguments &args) {
|
|
3978
4323
|
SWIGV8_HANDLESCOPE();
|
|
3979
4324
|
|
|
@@ -4285,6 +4630,156 @@ fail:
|
|
|
4285
4630
|
}
|
|
4286
4631
|
|
|
4287
4632
|
|
|
4633
|
+
static SwigV8ReturnValue _wrap_rgblib_send_btc_begin(const SwigV8Arguments &args) {
|
|
4634
|
+
SWIGV8_HANDLESCOPE();
|
|
4635
|
+
|
|
4636
|
+
SWIGV8_VALUE jsresult;
|
|
4637
|
+
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
4638
|
+
COpaqueStruct *arg2 = (COpaqueStruct *) 0 ;
|
|
4639
|
+
char *arg3 = (char *) 0 ;
|
|
4640
|
+
char *arg4 = (char *) 0 ;
|
|
4641
|
+
char *arg5 = (char *) 0 ;
|
|
4642
|
+
bool arg6 ;
|
|
4643
|
+
void *argp1 = 0 ;
|
|
4644
|
+
int res1 = 0 ;
|
|
4645
|
+
void *argp2 = 0 ;
|
|
4646
|
+
int res2 = 0 ;
|
|
4647
|
+
int res3 ;
|
|
4648
|
+
char *buf3 = 0 ;
|
|
4649
|
+
int alloc3 = 0 ;
|
|
4650
|
+
int res4 ;
|
|
4651
|
+
char *buf4 = 0 ;
|
|
4652
|
+
int alloc4 = 0 ;
|
|
4653
|
+
int res5 ;
|
|
4654
|
+
char *buf5 = 0 ;
|
|
4655
|
+
int alloc5 = 0 ;
|
|
4656
|
+
bool val6 ;
|
|
4657
|
+
int ecode6 = 0 ;
|
|
4658
|
+
CResultString result;
|
|
4659
|
+
|
|
4660
|
+
if (args.Length() < 6 || args.Length() > 6) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_send_btc_begin.");
|
|
4661
|
+
|
|
4662
|
+
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
4663
|
+
if (!SWIG_IsOK(res1)) {
|
|
4664
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_send_btc_begin" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
4665
|
+
}
|
|
4666
|
+
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);res2 = SWIG_ConvertPtr(args[1], &argp2,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
4667
|
+
if (!SWIG_IsOK(res2)) {
|
|
4668
|
+
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_send_btc_begin" "', argument " "2"" of type '" "COpaqueStruct const *""'");
|
|
4669
|
+
}
|
|
4670
|
+
arg2 = reinterpret_cast< COpaqueStruct * >(argp2);res3 = SWIG_AsCharPtrAndSize(args[2], &buf3, NULL, &alloc3);
|
|
4671
|
+
if (!SWIG_IsOK(res3)) {
|
|
4672
|
+
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rgblib_send_btc_begin" "', argument " "3"" of type '" "char const *""'");
|
|
4673
|
+
}
|
|
4674
|
+
arg3 = reinterpret_cast< char * >(buf3);res4 = SWIG_AsCharPtrAndSize(args[3], &buf4, NULL, &alloc4);
|
|
4675
|
+
if (!SWIG_IsOK(res4)) {
|
|
4676
|
+
SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "rgblib_send_btc_begin" "', argument " "4"" of type '" "char const *""'");
|
|
4677
|
+
}
|
|
4678
|
+
arg4 = reinterpret_cast< char * >(buf4);res5 = SWIG_AsCharPtrAndSize(args[4], &buf5, NULL, &alloc5);
|
|
4679
|
+
if (!SWIG_IsOK(res5)) {
|
|
4680
|
+
SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "rgblib_send_btc_begin" "', argument " "5"" of type '" "char const *""'");
|
|
4681
|
+
}
|
|
4682
|
+
arg5 = reinterpret_cast< char * >(buf5);ecode6 = SWIG_AsVal_bool(args[5], &val6);
|
|
4683
|
+
if (!SWIG_IsOK(ecode6)) {
|
|
4684
|
+
SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "rgblib_send_btc_begin" "', argument " "6"" of type '" "bool""'");
|
|
4685
|
+
}
|
|
4686
|
+
arg6 = static_cast< bool >(val6);result = rgblib_send_btc_begin((COpaqueStruct const *)arg1,(COpaqueStruct const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,arg6);
|
|
4687
|
+
|
|
4688
|
+
switch ((&result)->result) {
|
|
4689
|
+
case CResultValue::Ok:
|
|
4690
|
+
if ((&result)->inner == nullptr) {
|
|
4691
|
+
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
4692
|
+
} else {
|
|
4693
|
+
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
4694
|
+
delete ((&result)->inner);
|
|
4695
|
+
}
|
|
4696
|
+
break;
|
|
4697
|
+
case CResultValue::Err:
|
|
4698
|
+
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
4699
|
+
break;
|
|
4700
|
+
}
|
|
4701
|
+
|
|
4702
|
+
|
|
4703
|
+
|
|
4704
|
+
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
|
4705
|
+
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
|
4706
|
+
if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
|
|
4707
|
+
|
|
4708
|
+
|
|
4709
|
+
SWIGV8_RETURN(jsresult);
|
|
4710
|
+
|
|
4711
|
+
goto fail;
|
|
4712
|
+
fail:
|
|
4713
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
4714
|
+
}
|
|
4715
|
+
|
|
4716
|
+
|
|
4717
|
+
static SwigV8ReturnValue _wrap_rgblib_send_btc_end(const SwigV8Arguments &args) {
|
|
4718
|
+
SWIGV8_HANDLESCOPE();
|
|
4719
|
+
|
|
4720
|
+
SWIGV8_VALUE jsresult;
|
|
4721
|
+
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
4722
|
+
COpaqueStruct *arg2 = (COpaqueStruct *) 0 ;
|
|
4723
|
+
char *arg3 = (char *) 0 ;
|
|
4724
|
+
bool arg4 ;
|
|
4725
|
+
void *argp1 = 0 ;
|
|
4726
|
+
int res1 = 0 ;
|
|
4727
|
+
void *argp2 = 0 ;
|
|
4728
|
+
int res2 = 0 ;
|
|
4729
|
+
int res3 ;
|
|
4730
|
+
char *buf3 = 0 ;
|
|
4731
|
+
int alloc3 = 0 ;
|
|
4732
|
+
bool val4 ;
|
|
4733
|
+
int ecode4 = 0 ;
|
|
4734
|
+
CResultString result;
|
|
4735
|
+
|
|
4736
|
+
if (args.Length() < 4 || args.Length() > 4) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_send_btc_end.");
|
|
4737
|
+
|
|
4738
|
+
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
4739
|
+
if (!SWIG_IsOK(res1)) {
|
|
4740
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_send_btc_end" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
4741
|
+
}
|
|
4742
|
+
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);res2 = SWIG_ConvertPtr(args[1], &argp2,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
4743
|
+
if (!SWIG_IsOK(res2)) {
|
|
4744
|
+
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_send_btc_end" "', argument " "2"" of type '" "COpaqueStruct const *""'");
|
|
4745
|
+
}
|
|
4746
|
+
arg2 = reinterpret_cast< COpaqueStruct * >(argp2);res3 = SWIG_AsCharPtrAndSize(args[2], &buf3, NULL, &alloc3);
|
|
4747
|
+
if (!SWIG_IsOK(res3)) {
|
|
4748
|
+
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rgblib_send_btc_end" "', argument " "3"" of type '" "char const *""'");
|
|
4749
|
+
}
|
|
4750
|
+
arg3 = reinterpret_cast< char * >(buf3);ecode4 = SWIG_AsVal_bool(args[3], &val4);
|
|
4751
|
+
if (!SWIG_IsOK(ecode4)) {
|
|
4752
|
+
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "rgblib_send_btc_end" "', argument " "4"" of type '" "bool""'");
|
|
4753
|
+
}
|
|
4754
|
+
arg4 = static_cast< bool >(val4);result = rgblib_send_btc_end((COpaqueStruct const *)arg1,(COpaqueStruct const *)arg2,(char const *)arg3,arg4);
|
|
4755
|
+
|
|
4756
|
+
switch ((&result)->result) {
|
|
4757
|
+
case CResultValue::Ok:
|
|
4758
|
+
if ((&result)->inner == nullptr) {
|
|
4759
|
+
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
4760
|
+
} else {
|
|
4761
|
+
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
4762
|
+
delete ((&result)->inner);
|
|
4763
|
+
}
|
|
4764
|
+
break;
|
|
4765
|
+
case CResultValue::Err:
|
|
4766
|
+
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
4767
|
+
break;
|
|
4768
|
+
}
|
|
4769
|
+
|
|
4770
|
+
|
|
4771
|
+
|
|
4772
|
+
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
|
4773
|
+
|
|
4774
|
+
|
|
4775
|
+
SWIGV8_RETURN(jsresult);
|
|
4776
|
+
|
|
4777
|
+
goto fail;
|
|
4778
|
+
fail:
|
|
4779
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
4780
|
+
}
|
|
4781
|
+
|
|
4782
|
+
|
|
4288
4783
|
static SwigV8ReturnValue _wrap_rgblib_send_end(const SwigV8Arguments &args) {
|
|
4289
4784
|
SWIGV8_HANDLESCOPE();
|
|
4290
4785
|
|
|
@@ -4442,6 +4937,246 @@ static SwigV8ReturnValue _wrap_rgblib_sync(const SwigV8Arguments &args) {
|
|
|
4442
4937
|
|
|
4443
4938
|
|
|
4444
4939
|
|
|
4940
|
+
SWIGV8_RETURN(jsresult);
|
|
4941
|
+
|
|
4942
|
+
goto fail;
|
|
4943
|
+
fail:
|
|
4944
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
4945
|
+
}
|
|
4946
|
+
|
|
4947
|
+
|
|
4948
|
+
static SwigV8ReturnValue _wrap_rgblib_validate_consignment(const SwigV8Arguments &args) {
|
|
4949
|
+
SWIGV8_HANDLESCOPE();
|
|
4950
|
+
|
|
4951
|
+
SWIGV8_VALUE jsresult;
|
|
4952
|
+
char *arg1 = (char *) 0 ;
|
|
4953
|
+
char *arg2 = (char *) 0 ;
|
|
4954
|
+
char *arg3 = (char *) 0 ;
|
|
4955
|
+
int res1 ;
|
|
4956
|
+
char *buf1 = 0 ;
|
|
4957
|
+
int alloc1 = 0 ;
|
|
4958
|
+
int res2 ;
|
|
4959
|
+
char *buf2 = 0 ;
|
|
4960
|
+
int alloc2 = 0 ;
|
|
4961
|
+
int res3 ;
|
|
4962
|
+
char *buf3 = 0 ;
|
|
4963
|
+
int alloc3 = 0 ;
|
|
4964
|
+
CResultString result;
|
|
4965
|
+
|
|
4966
|
+
if (args.Length() < 3 || args.Length() > 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_validate_consignment.");
|
|
4967
|
+
|
|
4968
|
+
res1 = SWIG_AsCharPtrAndSize(args[0], &buf1, NULL, &alloc1);
|
|
4969
|
+
if (!SWIG_IsOK(res1)) {
|
|
4970
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_validate_consignment" "', argument " "1"" of type '" "char const *""'");
|
|
4971
|
+
}
|
|
4972
|
+
arg1 = reinterpret_cast< char * >(buf1);res2 = SWIG_AsCharPtrAndSize(args[1], &buf2, NULL, &alloc2);
|
|
4973
|
+
if (!SWIG_IsOK(res2)) {
|
|
4974
|
+
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_validate_consignment" "', argument " "2"" of type '" "char const *""'");
|
|
4975
|
+
}
|
|
4976
|
+
arg2 = reinterpret_cast< char * >(buf2);res3 = SWIG_AsCharPtrAndSize(args[2], &buf3, NULL, &alloc3);
|
|
4977
|
+
if (!SWIG_IsOK(res3)) {
|
|
4978
|
+
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rgblib_validate_consignment" "', argument " "3"" of type '" "char const *""'");
|
|
4979
|
+
}
|
|
4980
|
+
arg3 = reinterpret_cast< char * >(buf3);result = rgblib_validate_consignment((char const *)arg1,(char const *)arg2,(char const *)arg3);
|
|
4981
|
+
|
|
4982
|
+
switch ((&result)->result) {
|
|
4983
|
+
case CResultValue::Ok:
|
|
4984
|
+
if ((&result)->inner == nullptr) {
|
|
4985
|
+
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
4986
|
+
} else {
|
|
4987
|
+
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
4988
|
+
delete ((&result)->inner);
|
|
4989
|
+
}
|
|
4990
|
+
break;
|
|
4991
|
+
case CResultValue::Err:
|
|
4992
|
+
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
4993
|
+
break;
|
|
4994
|
+
}
|
|
4995
|
+
|
|
4996
|
+
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
|
4997
|
+
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
|
4998
|
+
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
|
4999
|
+
|
|
5000
|
+
SWIGV8_RETURN(jsresult);
|
|
5001
|
+
|
|
5002
|
+
goto fail;
|
|
5003
|
+
fail:
|
|
5004
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
5005
|
+
}
|
|
5006
|
+
|
|
5007
|
+
|
|
5008
|
+
static SwigV8ReturnValue _wrap_rgblib_vss_backup(const SwigV8Arguments &args) {
|
|
5009
|
+
SWIGV8_HANDLESCOPE();
|
|
5010
|
+
|
|
5011
|
+
SWIGV8_VALUE jsresult;
|
|
5012
|
+
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
5013
|
+
COpaqueStruct *arg2 = (COpaqueStruct *) 0 ;
|
|
5014
|
+
void *argp1 = 0 ;
|
|
5015
|
+
int res1 = 0 ;
|
|
5016
|
+
void *argp2 = 0 ;
|
|
5017
|
+
int res2 = 0 ;
|
|
5018
|
+
CResultString result;
|
|
5019
|
+
|
|
5020
|
+
if (args.Length() < 2 || args.Length() > 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_vss_backup.");
|
|
5021
|
+
|
|
5022
|
+
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
5023
|
+
if (!SWIG_IsOK(res1)) {
|
|
5024
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_vss_backup" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
5025
|
+
}
|
|
5026
|
+
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);res2 = SWIG_ConvertPtr(args[1], &argp2,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
5027
|
+
if (!SWIG_IsOK(res2)) {
|
|
5028
|
+
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_vss_backup" "', argument " "2"" of type '" "COpaqueStruct const *""'");
|
|
5029
|
+
}
|
|
5030
|
+
arg2 = reinterpret_cast< COpaqueStruct * >(argp2);result = rgblib_vss_backup((COpaqueStruct const *)arg1,(COpaqueStruct const *)arg2);
|
|
5031
|
+
|
|
5032
|
+
switch ((&result)->result) {
|
|
5033
|
+
case CResultValue::Ok:
|
|
5034
|
+
if ((&result)->inner == nullptr) {
|
|
5035
|
+
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
5036
|
+
} else {
|
|
5037
|
+
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
5038
|
+
delete ((&result)->inner);
|
|
5039
|
+
}
|
|
5040
|
+
break;
|
|
5041
|
+
case CResultValue::Err:
|
|
5042
|
+
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
5043
|
+
break;
|
|
5044
|
+
}
|
|
5045
|
+
|
|
5046
|
+
|
|
5047
|
+
|
|
5048
|
+
|
|
5049
|
+
SWIGV8_RETURN(jsresult);
|
|
5050
|
+
|
|
5051
|
+
goto fail;
|
|
5052
|
+
fail:
|
|
5053
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
5054
|
+
}
|
|
5055
|
+
|
|
5056
|
+
|
|
5057
|
+
static SwigV8ReturnValue _wrap_rgblib_vss_backup_client_encryption_enabled(const SwigV8Arguments &args) {
|
|
5058
|
+
SWIGV8_HANDLESCOPE();
|
|
5059
|
+
|
|
5060
|
+
SWIGV8_VALUE jsresult;
|
|
5061
|
+
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
5062
|
+
void *argp1 = 0 ;
|
|
5063
|
+
int res1 = 0 ;
|
|
5064
|
+
CResultString result;
|
|
5065
|
+
|
|
5066
|
+
if (args.Length() < 1 || args.Length() > 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_vss_backup_client_encryption_enabled.");
|
|
5067
|
+
|
|
5068
|
+
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
5069
|
+
if (!SWIG_IsOK(res1)) {
|
|
5070
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_vss_backup_client_encryption_enabled" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
5071
|
+
}
|
|
5072
|
+
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);result = rgblib_vss_backup_client_encryption_enabled((COpaqueStruct const *)arg1);
|
|
5073
|
+
|
|
5074
|
+
switch ((&result)->result) {
|
|
5075
|
+
case CResultValue::Ok:
|
|
5076
|
+
if ((&result)->inner == nullptr) {
|
|
5077
|
+
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
5078
|
+
} else {
|
|
5079
|
+
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
5080
|
+
delete ((&result)->inner);
|
|
5081
|
+
}
|
|
5082
|
+
break;
|
|
5083
|
+
case CResultValue::Err:
|
|
5084
|
+
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
5085
|
+
break;
|
|
5086
|
+
}
|
|
5087
|
+
|
|
5088
|
+
|
|
5089
|
+
|
|
5090
|
+
SWIGV8_RETURN(jsresult);
|
|
5091
|
+
|
|
5092
|
+
goto fail;
|
|
5093
|
+
fail:
|
|
5094
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
5095
|
+
}
|
|
5096
|
+
|
|
5097
|
+
|
|
5098
|
+
static SwigV8ReturnValue _wrap_rgblib_vss_backup_info(const SwigV8Arguments &args) {
|
|
5099
|
+
SWIGV8_HANDLESCOPE();
|
|
5100
|
+
|
|
5101
|
+
SWIGV8_VALUE jsresult;
|
|
5102
|
+
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
5103
|
+
COpaqueStruct *arg2 = (COpaqueStruct *) 0 ;
|
|
5104
|
+
void *argp1 = 0 ;
|
|
5105
|
+
int res1 = 0 ;
|
|
5106
|
+
void *argp2 = 0 ;
|
|
5107
|
+
int res2 = 0 ;
|
|
5108
|
+
CResultString result;
|
|
5109
|
+
|
|
5110
|
+
if (args.Length() < 2 || args.Length() > 2) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_vss_backup_info.");
|
|
5111
|
+
|
|
5112
|
+
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
5113
|
+
if (!SWIG_IsOK(res1)) {
|
|
5114
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_vss_backup_info" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
5115
|
+
}
|
|
5116
|
+
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);res2 = SWIG_ConvertPtr(args[1], &argp2,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
5117
|
+
if (!SWIG_IsOK(res2)) {
|
|
5118
|
+
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_vss_backup_info" "', argument " "2"" of type '" "COpaqueStruct const *""'");
|
|
5119
|
+
}
|
|
5120
|
+
arg2 = reinterpret_cast< COpaqueStruct * >(argp2);result = rgblib_vss_backup_info((COpaqueStruct const *)arg1,(COpaqueStruct const *)arg2);
|
|
5121
|
+
|
|
5122
|
+
switch ((&result)->result) {
|
|
5123
|
+
case CResultValue::Ok:
|
|
5124
|
+
if ((&result)->inner == nullptr) {
|
|
5125
|
+
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
5126
|
+
} else {
|
|
5127
|
+
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
5128
|
+
delete ((&result)->inner);
|
|
5129
|
+
}
|
|
5130
|
+
break;
|
|
5131
|
+
case CResultValue::Err:
|
|
5132
|
+
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
5133
|
+
break;
|
|
5134
|
+
}
|
|
5135
|
+
|
|
5136
|
+
|
|
5137
|
+
|
|
5138
|
+
|
|
5139
|
+
SWIGV8_RETURN(jsresult);
|
|
5140
|
+
|
|
5141
|
+
goto fail;
|
|
5142
|
+
fail:
|
|
5143
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
5144
|
+
}
|
|
5145
|
+
|
|
5146
|
+
|
|
5147
|
+
static SwigV8ReturnValue _wrap_rgblib_vss_delete_backup(const SwigV8Arguments &args) {
|
|
5148
|
+
SWIGV8_HANDLESCOPE();
|
|
5149
|
+
|
|
5150
|
+
SWIGV8_VALUE jsresult;
|
|
5151
|
+
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
5152
|
+
void *argp1 = 0 ;
|
|
5153
|
+
int res1 = 0 ;
|
|
5154
|
+
CResultString result;
|
|
5155
|
+
|
|
5156
|
+
if (args.Length() < 1 || args.Length() > 1) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_vss_delete_backup.");
|
|
5157
|
+
|
|
5158
|
+
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
5159
|
+
if (!SWIG_IsOK(res1)) {
|
|
5160
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_vss_delete_backup" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
5161
|
+
}
|
|
5162
|
+
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);result = rgblib_vss_delete_backup((COpaqueStruct const *)arg1);
|
|
5163
|
+
|
|
5164
|
+
switch ((&result)->result) {
|
|
5165
|
+
case CResultValue::Ok:
|
|
5166
|
+
if ((&result)->inner == nullptr) {
|
|
5167
|
+
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
5168
|
+
} else {
|
|
5169
|
+
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
5170
|
+
delete ((&result)->inner);
|
|
5171
|
+
}
|
|
5172
|
+
break;
|
|
5173
|
+
case CResultValue::Err:
|
|
5174
|
+
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
5175
|
+
break;
|
|
5176
|
+
}
|
|
5177
|
+
|
|
5178
|
+
|
|
5179
|
+
|
|
4445
5180
|
SWIGV8_RETURN(jsresult);
|
|
4446
5181
|
|
|
4447
5182
|
goto fail;
|
|
@@ -4958,13 +5693,18 @@ v8::Local<v8::Object> _exports_CResultString_obj = _exports_CResultString_class_
|
|
|
4958
5693
|
/* add static class functions and variables */
|
|
4959
5694
|
SWIGV8_AddStaticFunction(exports_obj, "free_invoice", _wrap_free_invoice, context);
|
|
4960
5695
|
SWIGV8_AddStaticFunction(exports_obj, "free_online", _wrap_free_online, context);
|
|
5696
|
+
SWIGV8_AddStaticFunction(exports_obj, "free_vss_backup_client", _wrap_free_vss_backup_client, context);
|
|
4961
5697
|
SWIGV8_AddStaticFunction(exports_obj, "free_wallet", _wrap_free_wallet, context);
|
|
4962
5698
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_backup", _wrap_rgblib_backup, context);
|
|
4963
5699
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_backup_info", _wrap_rgblib_backup_info, context);
|
|
4964
5700
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_blind_receive", _wrap_rgblib_blind_receive, context);
|
|
5701
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_configure_vss_backup", _wrap_rgblib_configure_vss_backup, context);
|
|
4965
5702
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_create_utxos", _wrap_rgblib_create_utxos, context);
|
|
4966
5703
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_create_utxos_begin", _wrap_rgblib_create_utxos_begin, context);
|
|
4967
5704
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_create_utxos_end", _wrap_rgblib_create_utxos_end, context);
|
|
5705
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_delete_transfers", _wrap_rgblib_delete_transfers, context);
|
|
5706
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_disable_vss_auto_backup", _wrap_rgblib_disable_vss_auto_backup, context);
|
|
5707
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_fail_transfers", _wrap_rgblib_fail_transfers, context);
|
|
4968
5708
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_finalize_psbt", _wrap_rgblib_finalize_psbt, context);
|
|
4969
5709
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_generate_keys", _wrap_rgblib_generate_keys, context);
|
|
4970
5710
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_get_address", _wrap_rgblib_get_address, context);
|
|
@@ -4984,16 +5724,25 @@ SWIGV8_AddStaticFunction(exports_obj, "rgblib_list_assets", _wrap_rgblib_list_as
|
|
|
4984
5724
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_list_transactions", _wrap_rgblib_list_transactions, context);
|
|
4985
5725
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_list_transfers", _wrap_rgblib_list_transfers, context);
|
|
4986
5726
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_list_unspents", _wrap_rgblib_list_unspents, context);
|
|
5727
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_new_vss_backup_client", _wrap_rgblib_new_vss_backup_client, context);
|
|
4987
5728
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_new_wallet", _wrap_rgblib_new_wallet, context);
|
|
4988
5729
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_refresh", _wrap_rgblib_refresh, context);
|
|
4989
5730
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_restore_backup", _wrap_rgblib_restore_backup, context);
|
|
5731
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_restore_from_vss", _wrap_rgblib_restore_from_vss, context);
|
|
4990
5732
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_restore_keys", _wrap_rgblib_restore_keys, context);
|
|
4991
5733
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_send", _wrap_rgblib_send, context);
|
|
4992
5734
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_begin", _wrap_rgblib_send_begin, context);
|
|
4993
5735
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_btc", _wrap_rgblib_send_btc, context);
|
|
5736
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_btc_begin", _wrap_rgblib_send_btc_begin, context);
|
|
5737
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_btc_end", _wrap_rgblib_send_btc_end, context);
|
|
4994
5738
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_end", _wrap_rgblib_send_end, context);
|
|
4995
5739
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_sign_psbt", _wrap_rgblib_sign_psbt, context);
|
|
4996
5740
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_sync", _wrap_rgblib_sync, context);
|
|
5741
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_validate_consignment", _wrap_rgblib_validate_consignment, context);
|
|
5742
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_vss_backup", _wrap_rgblib_vss_backup, context);
|
|
5743
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_vss_backup_client_encryption_enabled", _wrap_rgblib_vss_backup_client_encryption_enabled, context);
|
|
5744
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_vss_backup_info", _wrap_rgblib_vss_backup_info, context);
|
|
5745
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_vss_delete_backup", _wrap_rgblib_vss_delete_backup, context);
|
|
4997
5746
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_witness_receive", _wrap_rgblib_witness_receive, context);
|
|
4998
5747
|
|
|
4999
5748
|
|
package/wrapper.js
CHANGED
|
@@ -881,6 +881,23 @@ exports.Wallet = class Wallet {
|
|
|
881
881
|
}
|
|
882
882
|
};
|
|
883
883
|
|
|
884
|
+
exports.validateConsignment = function validateConsignment(filePath, indexerUrl, bitcoinNetwork) {
|
|
885
|
+
const params = { filePath, indexerUrl, bitcoinNetwork };
|
|
886
|
+
const expectedTypes = {
|
|
887
|
+
filePath: "string",
|
|
888
|
+
indexerUrl: "string",
|
|
889
|
+
bitcoinNetwork: "string",
|
|
890
|
+
};
|
|
891
|
+
validateTypes(params, expectedTypes);
|
|
892
|
+
validateEnumValues(
|
|
893
|
+
{ bitcoinNetwork },
|
|
894
|
+
{ bitcoinNetwork: BitcoinNetwork },
|
|
895
|
+
);
|
|
896
|
+
return JSON.parse(
|
|
897
|
+
lib.rgblib_validate_consignment(filePath, indexerUrl, bitcoinNetwork),
|
|
898
|
+
);
|
|
899
|
+
};
|
|
900
|
+
|
|
884
901
|
exports.Invoice = class Invoice {
|
|
885
902
|
constructor(invoiceString) {
|
|
886
903
|
const params = { invoiceString };
|