@utexo/rgb-lib-linux-x64 0.3.0-beta.11 → 0.3.0-beta.11.vss.backup
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utexo/rgb-lib-linux-x64",
|
|
3
|
-
"version": "0.3.0-beta.11",
|
|
3
|
+
"version": "0.3.0-beta.11.vss.backup",
|
|
4
4
|
"description": "Node.js bindings for rgb-lib on linux-x64",
|
|
5
5
|
"main": "wrapper.js",
|
|
6
6
|
"os": [
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"prepack": "touch rgb-lib/.npmignore",
|
|
25
25
|
"postpack": "rm rgb-lib/.npmignore",
|
|
26
26
|
"build": "npm run rust-build && npm run swig-build",
|
|
27
|
-
"rust-build": "cross build -r -F camel_case --manifest-path ./rgb-lib/bindings/c-ffi/Cargo.toml --target x86_64-unknown-linux-gnu",
|
|
27
|
+
"rust-build": "cross build -r -F camel_case,vss --manifest-path ./rgb-lib/bindings/c-ffi/Cargo.toml --target x86_64-unknown-linux-gnu",
|
|
28
28
|
"swig-build": "swig -javascript -node -c++ swig.i"
|
|
29
29
|
},
|
|
30
30
|
"author": "Zoe Faltibà <zoefaltiba@gmail.com>",
|
|
@@ -67,16 +67,6 @@ CResultString rgblib_create_utxos_end(const COpaqueStruct *wallet,
|
|
|
67
67
|
const char *signed_psbt,
|
|
68
68
|
bool skip_sync);
|
|
69
69
|
|
|
70
|
-
CResultString rgblib_delete_transfers(const COpaqueStruct *wallet,
|
|
71
|
-
const char *batch_transfer_idx_opt,
|
|
72
|
-
bool no_asset_only);
|
|
73
|
-
|
|
74
|
-
CResultString rgblib_fail_transfers(const COpaqueStruct *wallet,
|
|
75
|
-
const COpaqueStruct *online,
|
|
76
|
-
const char *batch_transfer_idx_opt,
|
|
77
|
-
bool no_asset_only,
|
|
78
|
-
bool skip_sync);
|
|
79
|
-
|
|
80
70
|
CResultString rgblib_finalize_psbt(const COpaqueStruct *wallet, const char *signed_psbt);
|
|
81
71
|
|
|
82
72
|
CResultString rgblib_generate_keys(const char *bitcoin_network);
|
|
@@ -189,18 +179,6 @@ CResultString rgblib_send_btc(const COpaqueStruct *wallet,
|
|
|
189
179
|
const char *fee_rate,
|
|
190
180
|
bool skip_sync);
|
|
191
181
|
|
|
192
|
-
CResultString rgblib_send_btc_begin(const COpaqueStruct *wallet,
|
|
193
|
-
const COpaqueStruct *online,
|
|
194
|
-
const char *address,
|
|
195
|
-
const char *amount,
|
|
196
|
-
const char *fee_rate,
|
|
197
|
-
bool skip_sync);
|
|
198
|
-
|
|
199
|
-
CResultString rgblib_send_btc_end(const COpaqueStruct *wallet,
|
|
200
|
-
const COpaqueStruct *online,
|
|
201
|
-
const char *signed_psbt,
|
|
202
|
-
bool skip_sync);
|
|
203
|
-
|
|
204
182
|
CResultString rgblib_send_end(const COpaqueStruct *wallet,
|
|
205
183
|
const COpaqueStruct *online,
|
|
206
184
|
const char *signed_psbt,
|
|
@@ -210,10 +188,6 @@ CResultString rgblib_sign_psbt(const COpaqueStruct *wallet, const char *unsigned
|
|
|
210
188
|
|
|
211
189
|
CResultString rgblib_sync(const COpaqueStruct *wallet, const COpaqueStruct *online);
|
|
212
190
|
|
|
213
|
-
CResultString rgblib_validate_consignment(const char *file_path,
|
|
214
|
-
const char *indexer_url,
|
|
215
|
-
const char *bitcoin_network);
|
|
216
|
-
|
|
217
191
|
CResultString rgblib_witness_receive(const COpaqueStruct *wallet,
|
|
218
192
|
const char *asset_id_opt,
|
|
219
193
|
const char *assignment,
|
|
Binary file
|
package/swig_wrap.cxx
CHANGED
|
@@ -2640,138 +2640,6 @@ fail:
|
|
|
2640
2640
|
}
|
|
2641
2641
|
|
|
2642
2642
|
|
|
2643
|
-
static SwigV8ReturnValue _wrap_rgblib_delete_transfers(const SwigV8Arguments &args) {
|
|
2644
|
-
SWIGV8_HANDLESCOPE();
|
|
2645
|
-
|
|
2646
|
-
SWIGV8_VALUE jsresult;
|
|
2647
|
-
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
2648
|
-
char *arg2 = (char *) 0 ;
|
|
2649
|
-
bool arg3 ;
|
|
2650
|
-
void *argp1 = 0 ;
|
|
2651
|
-
int res1 = 0 ;
|
|
2652
|
-
int res2 ;
|
|
2653
|
-
char *buf2 = 0 ;
|
|
2654
|
-
int alloc2 = 0 ;
|
|
2655
|
-
bool val3 ;
|
|
2656
|
-
int ecode3 = 0 ;
|
|
2657
|
-
CResultString result;
|
|
2658
|
-
|
|
2659
|
-
if (args.Length() < 3 || args.Length() > 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_delete_transfers.");
|
|
2660
|
-
|
|
2661
|
-
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
2662
|
-
if (!SWIG_IsOK(res1)) {
|
|
2663
|
-
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_delete_transfers" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
2664
|
-
}
|
|
2665
|
-
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);res2 = SWIG_AsCharPtrAndSize(args[1], &buf2, NULL, &alloc2);
|
|
2666
|
-
if (!SWIG_IsOK(res2)) {
|
|
2667
|
-
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_delete_transfers" "', argument " "2"" of type '" "char const *""'");
|
|
2668
|
-
}
|
|
2669
|
-
arg2 = reinterpret_cast< char * >(buf2);ecode3 = SWIG_AsVal_bool(args[2], &val3);
|
|
2670
|
-
if (!SWIG_IsOK(ecode3)) {
|
|
2671
|
-
SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rgblib_delete_transfers" "', argument " "3"" of type '" "bool""'");
|
|
2672
|
-
}
|
|
2673
|
-
arg3 = static_cast< bool >(val3);result = rgblib_delete_transfers((COpaqueStruct const *)arg1,(char const *)arg2,arg3);
|
|
2674
|
-
|
|
2675
|
-
switch ((&result)->result) {
|
|
2676
|
-
case CResultValue::Ok:
|
|
2677
|
-
if ((&result)->inner == nullptr) {
|
|
2678
|
-
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
2679
|
-
} else {
|
|
2680
|
-
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
2681
|
-
delete ((&result)->inner);
|
|
2682
|
-
}
|
|
2683
|
-
break;
|
|
2684
|
-
case CResultValue::Err:
|
|
2685
|
-
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
2686
|
-
break;
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
SWIGV8_RETURN(jsresult);
|
|
2694
|
-
|
|
2695
|
-
goto fail;
|
|
2696
|
-
fail:
|
|
2697
|
-
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
2698
|
-
}
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
static SwigV8ReturnValue _wrap_rgblib_fail_transfers(const SwigV8Arguments &args) {
|
|
2702
|
-
SWIGV8_HANDLESCOPE();
|
|
2703
|
-
|
|
2704
|
-
SWIGV8_VALUE jsresult;
|
|
2705
|
-
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
2706
|
-
COpaqueStruct *arg2 = (COpaqueStruct *) 0 ;
|
|
2707
|
-
char *arg3 = (char *) 0 ;
|
|
2708
|
-
bool arg4 ;
|
|
2709
|
-
bool arg5 ;
|
|
2710
|
-
void *argp1 = 0 ;
|
|
2711
|
-
int res1 = 0 ;
|
|
2712
|
-
void *argp2 = 0 ;
|
|
2713
|
-
int res2 = 0 ;
|
|
2714
|
-
int res3 ;
|
|
2715
|
-
char *buf3 = 0 ;
|
|
2716
|
-
int alloc3 = 0 ;
|
|
2717
|
-
bool val4 ;
|
|
2718
|
-
int ecode4 = 0 ;
|
|
2719
|
-
bool val5 ;
|
|
2720
|
-
int ecode5 = 0 ;
|
|
2721
|
-
CResultString result;
|
|
2722
|
-
|
|
2723
|
-
if (args.Length() < 5 || args.Length() > 5) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_fail_transfers.");
|
|
2724
|
-
|
|
2725
|
-
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
2726
|
-
if (!SWIG_IsOK(res1)) {
|
|
2727
|
-
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_fail_transfers" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
2728
|
-
}
|
|
2729
|
-
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);res2 = SWIG_ConvertPtr(args[1], &argp2,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
2730
|
-
if (!SWIG_IsOK(res2)) {
|
|
2731
|
-
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_fail_transfers" "', argument " "2"" of type '" "COpaqueStruct const *""'");
|
|
2732
|
-
}
|
|
2733
|
-
arg2 = reinterpret_cast< COpaqueStruct * >(argp2);res3 = SWIG_AsCharPtrAndSize(args[2], &buf3, NULL, &alloc3);
|
|
2734
|
-
if (!SWIG_IsOK(res3)) {
|
|
2735
|
-
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rgblib_fail_transfers" "', argument " "3"" of type '" "char const *""'");
|
|
2736
|
-
}
|
|
2737
|
-
arg3 = reinterpret_cast< char * >(buf3);ecode4 = SWIG_AsVal_bool(args[3], &val4);
|
|
2738
|
-
if (!SWIG_IsOK(ecode4)) {
|
|
2739
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "rgblib_fail_transfers" "', argument " "4"" of type '" "bool""'");
|
|
2740
|
-
}
|
|
2741
|
-
arg4 = static_cast< bool >(val4);ecode5 = SWIG_AsVal_bool(args[4], &val5);
|
|
2742
|
-
if (!SWIG_IsOK(ecode5)) {
|
|
2743
|
-
SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "rgblib_fail_transfers" "', argument " "5"" of type '" "bool""'");
|
|
2744
|
-
}
|
|
2745
|
-
arg5 = static_cast< bool >(val5);result = rgblib_fail_transfers((COpaqueStruct const *)arg1,(COpaqueStruct const *)arg2,(char const *)arg3,arg4,arg5);
|
|
2746
|
-
|
|
2747
|
-
switch ((&result)->result) {
|
|
2748
|
-
case CResultValue::Ok:
|
|
2749
|
-
if ((&result)->inner == nullptr) {
|
|
2750
|
-
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
2751
|
-
} else {
|
|
2752
|
-
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
2753
|
-
delete ((&result)->inner);
|
|
2754
|
-
}
|
|
2755
|
-
break;
|
|
2756
|
-
case CResultValue::Err:
|
|
2757
|
-
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
2758
|
-
break;
|
|
2759
|
-
}
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
SWIGV8_RETURN(jsresult);
|
|
2768
|
-
|
|
2769
|
-
goto fail;
|
|
2770
|
-
fail:
|
|
2771
|
-
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
2772
|
-
}
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
2643
|
static SwigV8ReturnValue _wrap_rgblib_finalize_psbt(const SwigV8Arguments &args) {
|
|
2776
2644
|
SWIGV8_HANDLESCOPE();
|
|
2777
2645
|
|
|
@@ -4417,156 +4285,6 @@ fail:
|
|
|
4417
4285
|
}
|
|
4418
4286
|
|
|
4419
4287
|
|
|
4420
|
-
static SwigV8ReturnValue _wrap_rgblib_send_btc_begin(const SwigV8Arguments &args) {
|
|
4421
|
-
SWIGV8_HANDLESCOPE();
|
|
4422
|
-
|
|
4423
|
-
SWIGV8_VALUE jsresult;
|
|
4424
|
-
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
4425
|
-
COpaqueStruct *arg2 = (COpaqueStruct *) 0 ;
|
|
4426
|
-
char *arg3 = (char *) 0 ;
|
|
4427
|
-
char *arg4 = (char *) 0 ;
|
|
4428
|
-
char *arg5 = (char *) 0 ;
|
|
4429
|
-
bool arg6 ;
|
|
4430
|
-
void *argp1 = 0 ;
|
|
4431
|
-
int res1 = 0 ;
|
|
4432
|
-
void *argp2 = 0 ;
|
|
4433
|
-
int res2 = 0 ;
|
|
4434
|
-
int res3 ;
|
|
4435
|
-
char *buf3 = 0 ;
|
|
4436
|
-
int alloc3 = 0 ;
|
|
4437
|
-
int res4 ;
|
|
4438
|
-
char *buf4 = 0 ;
|
|
4439
|
-
int alloc4 = 0 ;
|
|
4440
|
-
int res5 ;
|
|
4441
|
-
char *buf5 = 0 ;
|
|
4442
|
-
int alloc5 = 0 ;
|
|
4443
|
-
bool val6 ;
|
|
4444
|
-
int ecode6 = 0 ;
|
|
4445
|
-
CResultString result;
|
|
4446
|
-
|
|
4447
|
-
if (args.Length() < 6 || args.Length() > 6) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_send_btc_begin.");
|
|
4448
|
-
|
|
4449
|
-
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
4450
|
-
if (!SWIG_IsOK(res1)) {
|
|
4451
|
-
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_send_btc_begin" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
4452
|
-
}
|
|
4453
|
-
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);res2 = SWIG_ConvertPtr(args[1], &argp2,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
4454
|
-
if (!SWIG_IsOK(res2)) {
|
|
4455
|
-
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_send_btc_begin" "', argument " "2"" of type '" "COpaqueStruct const *""'");
|
|
4456
|
-
}
|
|
4457
|
-
arg2 = reinterpret_cast< COpaqueStruct * >(argp2);res3 = SWIG_AsCharPtrAndSize(args[2], &buf3, NULL, &alloc3);
|
|
4458
|
-
if (!SWIG_IsOK(res3)) {
|
|
4459
|
-
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rgblib_send_btc_begin" "', argument " "3"" of type '" "char const *""'");
|
|
4460
|
-
}
|
|
4461
|
-
arg3 = reinterpret_cast< char * >(buf3);res4 = SWIG_AsCharPtrAndSize(args[3], &buf4, NULL, &alloc4);
|
|
4462
|
-
if (!SWIG_IsOK(res4)) {
|
|
4463
|
-
SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "rgblib_send_btc_begin" "', argument " "4"" of type '" "char const *""'");
|
|
4464
|
-
}
|
|
4465
|
-
arg4 = reinterpret_cast< char * >(buf4);res5 = SWIG_AsCharPtrAndSize(args[4], &buf5, NULL, &alloc5);
|
|
4466
|
-
if (!SWIG_IsOK(res5)) {
|
|
4467
|
-
SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "rgblib_send_btc_begin" "', argument " "5"" of type '" "char const *""'");
|
|
4468
|
-
}
|
|
4469
|
-
arg5 = reinterpret_cast< char * >(buf5);ecode6 = SWIG_AsVal_bool(args[5], &val6);
|
|
4470
|
-
if (!SWIG_IsOK(ecode6)) {
|
|
4471
|
-
SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "rgblib_send_btc_begin" "', argument " "6"" of type '" "bool""'");
|
|
4472
|
-
}
|
|
4473
|
-
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);
|
|
4474
|
-
|
|
4475
|
-
switch ((&result)->result) {
|
|
4476
|
-
case CResultValue::Ok:
|
|
4477
|
-
if ((&result)->inner == nullptr) {
|
|
4478
|
-
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
4479
|
-
} else {
|
|
4480
|
-
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
4481
|
-
delete ((&result)->inner);
|
|
4482
|
-
}
|
|
4483
|
-
break;
|
|
4484
|
-
case CResultValue::Err:
|
|
4485
|
-
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
4486
|
-
break;
|
|
4487
|
-
}
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
|
4492
|
-
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
|
4493
|
-
if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
SWIGV8_RETURN(jsresult);
|
|
4497
|
-
|
|
4498
|
-
goto fail;
|
|
4499
|
-
fail:
|
|
4500
|
-
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
4501
|
-
}
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
static SwigV8ReturnValue _wrap_rgblib_send_btc_end(const SwigV8Arguments &args) {
|
|
4505
|
-
SWIGV8_HANDLESCOPE();
|
|
4506
|
-
|
|
4507
|
-
SWIGV8_VALUE jsresult;
|
|
4508
|
-
COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
|
|
4509
|
-
COpaqueStruct *arg2 = (COpaqueStruct *) 0 ;
|
|
4510
|
-
char *arg3 = (char *) 0 ;
|
|
4511
|
-
bool arg4 ;
|
|
4512
|
-
void *argp1 = 0 ;
|
|
4513
|
-
int res1 = 0 ;
|
|
4514
|
-
void *argp2 = 0 ;
|
|
4515
|
-
int res2 = 0 ;
|
|
4516
|
-
int res3 ;
|
|
4517
|
-
char *buf3 = 0 ;
|
|
4518
|
-
int alloc3 = 0 ;
|
|
4519
|
-
bool val4 ;
|
|
4520
|
-
int ecode4 = 0 ;
|
|
4521
|
-
CResultString result;
|
|
4522
|
-
|
|
4523
|
-
if (args.Length() < 4 || args.Length() > 4) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_send_btc_end.");
|
|
4524
|
-
|
|
4525
|
-
res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
4526
|
-
if (!SWIG_IsOK(res1)) {
|
|
4527
|
-
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_send_btc_end" "', argument " "1"" of type '" "COpaqueStruct const *""'");
|
|
4528
|
-
}
|
|
4529
|
-
arg1 = reinterpret_cast< COpaqueStruct * >(argp1);res2 = SWIG_ConvertPtr(args[1], &argp2,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
|
|
4530
|
-
if (!SWIG_IsOK(res2)) {
|
|
4531
|
-
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_send_btc_end" "', argument " "2"" of type '" "COpaqueStruct const *""'");
|
|
4532
|
-
}
|
|
4533
|
-
arg2 = reinterpret_cast< COpaqueStruct * >(argp2);res3 = SWIG_AsCharPtrAndSize(args[2], &buf3, NULL, &alloc3);
|
|
4534
|
-
if (!SWIG_IsOK(res3)) {
|
|
4535
|
-
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rgblib_send_btc_end" "', argument " "3"" of type '" "char const *""'");
|
|
4536
|
-
}
|
|
4537
|
-
arg3 = reinterpret_cast< char * >(buf3);ecode4 = SWIG_AsVal_bool(args[3], &val4);
|
|
4538
|
-
if (!SWIG_IsOK(ecode4)) {
|
|
4539
|
-
SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "rgblib_send_btc_end" "', argument " "4"" of type '" "bool""'");
|
|
4540
|
-
}
|
|
4541
|
-
arg4 = static_cast< bool >(val4);result = rgblib_send_btc_end((COpaqueStruct const *)arg1,(COpaqueStruct const *)arg2,(char const *)arg3,arg4);
|
|
4542
|
-
|
|
4543
|
-
switch ((&result)->result) {
|
|
4544
|
-
case CResultValue::Ok:
|
|
4545
|
-
if ((&result)->inner == nullptr) {
|
|
4546
|
-
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
4547
|
-
} else {
|
|
4548
|
-
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
4549
|
-
delete ((&result)->inner);
|
|
4550
|
-
}
|
|
4551
|
-
break;
|
|
4552
|
-
case CResultValue::Err:
|
|
4553
|
-
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
4554
|
-
break;
|
|
4555
|
-
}
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
SWIGV8_RETURN(jsresult);
|
|
4563
|
-
|
|
4564
|
-
goto fail;
|
|
4565
|
-
fail:
|
|
4566
|
-
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
4567
|
-
}
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
4288
|
static SwigV8ReturnValue _wrap_rgblib_send_end(const SwigV8Arguments &args) {
|
|
4571
4289
|
SWIGV8_HANDLESCOPE();
|
|
4572
4290
|
|
|
@@ -4732,66 +4450,6 @@ fail:
|
|
|
4732
4450
|
}
|
|
4733
4451
|
|
|
4734
4452
|
|
|
4735
|
-
static SwigV8ReturnValue _wrap_rgblib_validate_consignment(const SwigV8Arguments &args) {
|
|
4736
|
-
SWIGV8_HANDLESCOPE();
|
|
4737
|
-
|
|
4738
|
-
SWIGV8_VALUE jsresult;
|
|
4739
|
-
char *arg1 = (char *) 0 ;
|
|
4740
|
-
char *arg2 = (char *) 0 ;
|
|
4741
|
-
char *arg3 = (char *) 0 ;
|
|
4742
|
-
int res1 ;
|
|
4743
|
-
char *buf1 = 0 ;
|
|
4744
|
-
int alloc1 = 0 ;
|
|
4745
|
-
int res2 ;
|
|
4746
|
-
char *buf2 = 0 ;
|
|
4747
|
-
int alloc2 = 0 ;
|
|
4748
|
-
int res3 ;
|
|
4749
|
-
char *buf3 = 0 ;
|
|
4750
|
-
int alloc3 = 0 ;
|
|
4751
|
-
CResultString result;
|
|
4752
|
-
|
|
4753
|
-
if (args.Length() < 3 || args.Length() > 3) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_validate_consignment.");
|
|
4754
|
-
|
|
4755
|
-
res1 = SWIG_AsCharPtrAndSize(args[0], &buf1, NULL, &alloc1);
|
|
4756
|
-
if (!SWIG_IsOK(res1)) {
|
|
4757
|
-
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_validate_consignment" "', argument " "1"" of type '" "char const *""'");
|
|
4758
|
-
}
|
|
4759
|
-
arg1 = reinterpret_cast< char * >(buf1);res2 = SWIG_AsCharPtrAndSize(args[1], &buf2, NULL, &alloc2);
|
|
4760
|
-
if (!SWIG_IsOK(res2)) {
|
|
4761
|
-
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_validate_consignment" "', argument " "2"" of type '" "char const *""'");
|
|
4762
|
-
}
|
|
4763
|
-
arg2 = reinterpret_cast< char * >(buf2);res3 = SWIG_AsCharPtrAndSize(args[2], &buf3, NULL, &alloc3);
|
|
4764
|
-
if (!SWIG_IsOK(res3)) {
|
|
4765
|
-
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rgblib_validate_consignment" "', argument " "3"" of type '" "char const *""'");
|
|
4766
|
-
}
|
|
4767
|
-
arg3 = reinterpret_cast< char * >(buf3);result = rgblib_validate_consignment((char const *)arg1,(char const *)arg2,(char const *)arg3);
|
|
4768
|
-
|
|
4769
|
-
switch ((&result)->result) {
|
|
4770
|
-
case CResultValue::Ok:
|
|
4771
|
-
if ((&result)->inner == nullptr) {
|
|
4772
|
-
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
4773
|
-
} else {
|
|
4774
|
-
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
4775
|
-
delete ((&result)->inner);
|
|
4776
|
-
}
|
|
4777
|
-
break;
|
|
4778
|
-
case CResultValue::Err:
|
|
4779
|
-
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
4780
|
-
break;
|
|
4781
|
-
}
|
|
4782
|
-
|
|
4783
|
-
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
|
4784
|
-
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
|
4785
|
-
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
|
4786
|
-
|
|
4787
|
-
SWIGV8_RETURN(jsresult);
|
|
4788
|
-
|
|
4789
|
-
goto fail;
|
|
4790
|
-
fail:
|
|
4791
|
-
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
4792
|
-
}
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
4453
|
static SwigV8ReturnValue _wrap_rgblib_witness_receive(const SwigV8Arguments &args) {
|
|
4796
4454
|
SWIGV8_HANDLESCOPE();
|
|
4797
4455
|
|
|
@@ -5307,8 +4965,6 @@ SWIGV8_AddStaticFunction(exports_obj, "rgblib_blind_receive", _wrap_rgblib_blind
|
|
|
5307
4965
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_create_utxos", _wrap_rgblib_create_utxos, context);
|
|
5308
4966
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_create_utxos_begin", _wrap_rgblib_create_utxos_begin, context);
|
|
5309
4967
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_create_utxos_end", _wrap_rgblib_create_utxos_end, context);
|
|
5310
|
-
SWIGV8_AddStaticFunction(exports_obj, "rgblib_delete_transfers", _wrap_rgblib_delete_transfers, context);
|
|
5311
|
-
SWIGV8_AddStaticFunction(exports_obj, "rgblib_fail_transfers", _wrap_rgblib_fail_transfers, context);
|
|
5312
4968
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_finalize_psbt", _wrap_rgblib_finalize_psbt, context);
|
|
5313
4969
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_generate_keys", _wrap_rgblib_generate_keys, context);
|
|
5314
4970
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_get_address", _wrap_rgblib_get_address, context);
|
|
@@ -5335,12 +4991,9 @@ SWIGV8_AddStaticFunction(exports_obj, "rgblib_restore_keys", _wrap_rgblib_restor
|
|
|
5335
4991
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_send", _wrap_rgblib_send, context);
|
|
5336
4992
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_begin", _wrap_rgblib_send_begin, context);
|
|
5337
4993
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_btc", _wrap_rgblib_send_btc, context);
|
|
5338
|
-
SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_btc_begin", _wrap_rgblib_send_btc_begin, context);
|
|
5339
|
-
SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_btc_end", _wrap_rgblib_send_btc_end, context);
|
|
5340
4994
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_end", _wrap_rgblib_send_end, context);
|
|
5341
4995
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_sign_psbt", _wrap_rgblib_sign_psbt, context);
|
|
5342
4996
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_sync", _wrap_rgblib_sync, context);
|
|
5343
|
-
SWIGV8_AddStaticFunction(exports_obj, "rgblib_validate_consignment", _wrap_rgblib_validate_consignment, context);
|
|
5344
4997
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_witness_receive", _wrap_rgblib_witness_receive, context);
|
|
5345
4998
|
|
|
5346
4999
|
|
package/wrapper.js
CHANGED
|
@@ -200,6 +200,42 @@ exports.restoreKeys = function (bitcoinNetwork, mnemonic) {
|
|
|
200
200
|
return JSON.parse(lib.rgblib_restore_keys(bitcoinNetwork, mnemonic));
|
|
201
201
|
};
|
|
202
202
|
|
|
203
|
+
exports.restoreFromVss = function (config, targetDir) {
|
|
204
|
+
const expectedTypes = {
|
|
205
|
+
server_url: "string",
|
|
206
|
+
store_id: "string",
|
|
207
|
+
signing_key: "string",
|
|
208
|
+
};
|
|
209
|
+
validateTypes(config, expectedTypes);
|
|
210
|
+
validateTypes({ targetDir }, { targetDir: "string" });
|
|
211
|
+
return lib.rgblib_restore_from_vss(JSON.stringify(config), targetDir);
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
exports.VssBackupClient = class VssBackupClient {
|
|
215
|
+
constructor(config) {
|
|
216
|
+
const expectedTypes = {
|
|
217
|
+
server_url: "string",
|
|
218
|
+
store_id: "string",
|
|
219
|
+
signing_key: "string",
|
|
220
|
+
};
|
|
221
|
+
validateTypes(config, expectedTypes);
|
|
222
|
+
this.client = lib.rgblib_new_vss_backup_client(JSON.stringify(config));
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
drop() {
|
|
226
|
+
lib.free_vss_backup_client(this.client);
|
|
227
|
+
this.client = null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
encryptionEnabled() {
|
|
231
|
+
return lib.rgblib_vss_backup_client_encryption_enabled(this.client);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
deleteBackup() {
|
|
235
|
+
lib.rgblib_vss_delete_backup(this.client);
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
|
|
203
239
|
exports.WalletData = class WalletData {
|
|
204
240
|
constructor(walletData) {
|
|
205
241
|
const expectedTypes = {
|
|
@@ -244,6 +280,38 @@ exports.Wallet = class Wallet {
|
|
|
244
280
|
return JSON.parse(lib.rgblib_backup_info(this.wallet));
|
|
245
281
|
}
|
|
246
282
|
|
|
283
|
+
configureVssBackup(config) {
|
|
284
|
+
const expectedTypes = {
|
|
285
|
+
server_url: "string",
|
|
286
|
+
store_id: "string",
|
|
287
|
+
signing_key: "string",
|
|
288
|
+
};
|
|
289
|
+
validateTypes(config, expectedTypes);
|
|
290
|
+
lib.rgblib_configure_vss_backup(this.wallet, JSON.stringify(config));
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
disableVssAutoBackup() {
|
|
294
|
+
lib.rgblib_disable_vss_auto_backup(this.wallet);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
vssBackup(vssBackupClient) {
|
|
298
|
+
if (!vssBackupClient || !vssBackupClient.client) {
|
|
299
|
+
throw new Error("vssBackupClient must be a VssBackupClient instance");
|
|
300
|
+
}
|
|
301
|
+
return JSON.parse(
|
|
302
|
+
lib.rgblib_vss_backup(this.wallet, vssBackupClient.client),
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
vssBackupInfo(vssBackupClient) {
|
|
307
|
+
if (!vssBackupClient || !vssBackupClient.client) {
|
|
308
|
+
throw new Error("vssBackupClient must be a VssBackupClient instance");
|
|
309
|
+
}
|
|
310
|
+
return JSON.parse(
|
|
311
|
+
lib.rgblib_vss_backup_info(this.wallet, vssBackupClient.client),
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
|
|
247
315
|
blindReceive(
|
|
248
316
|
assetId,
|
|
249
317
|
assignment,
|