@utexo/rgb-lib-linux-x64 0.3.0-beta.17 → 0.3.0-beta.18

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.17",
3
+ "version": "0.3.0-beta.18",
4
4
  "description": "Node.js bindings for rgb-lib on linux-x64",
5
5
  "main": "wrapper.js",
6
6
  "os": [
@@ -207,6 +207,18 @@ CResultString rgblib_send_btc(const COpaqueStruct *wallet,
207
207
  const char *fee_rate,
208
208
  bool skip_sync);
209
209
 
210
+ CResultString rgblib_send_btc_begin(const COpaqueStruct *wallet,
211
+ const COpaqueStruct *online,
212
+ const char *address,
213
+ const char *amount,
214
+ const char *fee_rate,
215
+ bool skip_sync);
216
+
217
+ CResultString rgblib_send_btc_end(const COpaqueStruct *wallet,
218
+ const COpaqueStruct *online,
219
+ const char *signed_psbt,
220
+ bool skip_sync);
221
+
210
222
  CResultString rgblib_send_end(const COpaqueStruct *wallet,
211
223
  const COpaqueStruct *online,
212
224
  const char *signed_psbt,
package/swig_wrap.cxx CHANGED
@@ -4784,6 +4784,156 @@ fail:
4784
4784
  }
4785
4785
 
4786
4786
 
4787
+ static SwigV8ReturnValue _wrap_rgblib_send_btc_begin(const SwigV8Arguments &args) {
4788
+ SWIGV8_HANDLESCOPE();
4789
+
4790
+ SWIGV8_VALUE jsresult;
4791
+ COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
4792
+ COpaqueStruct *arg2 = (COpaqueStruct *) 0 ;
4793
+ char *arg3 = (char *) 0 ;
4794
+ char *arg4 = (char *) 0 ;
4795
+ char *arg5 = (char *) 0 ;
4796
+ bool arg6 ;
4797
+ void *argp1 = 0 ;
4798
+ int res1 = 0 ;
4799
+ void *argp2 = 0 ;
4800
+ int res2 = 0 ;
4801
+ int res3 ;
4802
+ char *buf3 = 0 ;
4803
+ int alloc3 = 0 ;
4804
+ int res4 ;
4805
+ char *buf4 = 0 ;
4806
+ int alloc4 = 0 ;
4807
+ int res5 ;
4808
+ char *buf5 = 0 ;
4809
+ int alloc5 = 0 ;
4810
+ bool val6 ;
4811
+ int ecode6 = 0 ;
4812
+ CResultString result;
4813
+
4814
+ if (args.Length() < 6 || args.Length() > 6) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_send_btc_begin.");
4815
+
4816
+ res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
4817
+ if (!SWIG_IsOK(res1)) {
4818
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_send_btc_begin" "', argument " "1"" of type '" "COpaqueStruct const *""'");
4819
+ }
4820
+ arg1 = reinterpret_cast< COpaqueStruct * >(argp1);res2 = SWIG_ConvertPtr(args[1], &argp2,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
4821
+ if (!SWIG_IsOK(res2)) {
4822
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_send_btc_begin" "', argument " "2"" of type '" "COpaqueStruct const *""'");
4823
+ }
4824
+ arg2 = reinterpret_cast< COpaqueStruct * >(argp2);res3 = SWIG_AsCharPtrAndSize(args[2], &buf3, NULL, &alloc3);
4825
+ if (!SWIG_IsOK(res3)) {
4826
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rgblib_send_btc_begin" "', argument " "3"" of type '" "char const *""'");
4827
+ }
4828
+ arg3 = reinterpret_cast< char * >(buf3);res4 = SWIG_AsCharPtrAndSize(args[3], &buf4, NULL, &alloc4);
4829
+ if (!SWIG_IsOK(res4)) {
4830
+ SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "rgblib_send_btc_begin" "', argument " "4"" of type '" "char const *""'");
4831
+ }
4832
+ arg4 = reinterpret_cast< char * >(buf4);res5 = SWIG_AsCharPtrAndSize(args[4], &buf5, NULL, &alloc5);
4833
+ if (!SWIG_IsOK(res5)) {
4834
+ SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "rgblib_send_btc_begin" "', argument " "5"" of type '" "char const *""'");
4835
+ }
4836
+ arg5 = reinterpret_cast< char * >(buf5);ecode6 = SWIG_AsVal_bool(args[5], &val6);
4837
+ if (!SWIG_IsOK(ecode6)) {
4838
+ SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "rgblib_send_btc_begin" "', argument " "6"" of type '" "bool""'");
4839
+ }
4840
+ 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);
4841
+
4842
+ switch ((&result)->result) {
4843
+ case CResultValue::Ok:
4844
+ if ((&result)->inner == nullptr) {
4845
+ jsresult = v8::Null(v8::Isolate::GetCurrent());
4846
+ } else {
4847
+ jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
4848
+ delete ((&result)->inner);
4849
+ }
4850
+ break;
4851
+ case CResultValue::Err:
4852
+ SWIG_V8_Raise((const char*) (&result)->inner);
4853
+ break;
4854
+ }
4855
+
4856
+
4857
+
4858
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4859
+ if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
4860
+ if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
4861
+
4862
+
4863
+ SWIGV8_RETURN(jsresult);
4864
+
4865
+ goto fail;
4866
+ fail:
4867
+ SWIGV8_RETURN(SWIGV8_UNDEFINED());
4868
+ }
4869
+
4870
+
4871
+ static SwigV8ReturnValue _wrap_rgblib_send_btc_end(const SwigV8Arguments &args) {
4872
+ SWIGV8_HANDLESCOPE();
4873
+
4874
+ SWIGV8_VALUE jsresult;
4875
+ COpaqueStruct *arg1 = (COpaqueStruct *) 0 ;
4876
+ COpaqueStruct *arg2 = (COpaqueStruct *) 0 ;
4877
+ char *arg3 = (char *) 0 ;
4878
+ bool arg4 ;
4879
+ void *argp1 = 0 ;
4880
+ int res1 = 0 ;
4881
+ void *argp2 = 0 ;
4882
+ int res2 = 0 ;
4883
+ int res3 ;
4884
+ char *buf3 = 0 ;
4885
+ int alloc3 = 0 ;
4886
+ bool val4 ;
4887
+ int ecode4 = 0 ;
4888
+ CResultString result;
4889
+
4890
+ if (args.Length() < 4 || args.Length() > 4) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_send_btc_end.");
4891
+
4892
+ res1 = SWIG_ConvertPtr(args[0], &argp1,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
4893
+ if (!SWIG_IsOK(res1)) {
4894
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_send_btc_end" "', argument " "1"" of type '" "COpaqueStruct const *""'");
4895
+ }
4896
+ arg1 = reinterpret_cast< COpaqueStruct * >(argp1);res2 = SWIG_ConvertPtr(args[1], &argp2,SWIGTYPE_p_COpaqueStruct, 0 | 0 );
4897
+ if (!SWIG_IsOK(res2)) {
4898
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_send_btc_end" "', argument " "2"" of type '" "COpaqueStruct const *""'");
4899
+ }
4900
+ arg2 = reinterpret_cast< COpaqueStruct * >(argp2);res3 = SWIG_AsCharPtrAndSize(args[2], &buf3, NULL, &alloc3);
4901
+ if (!SWIG_IsOK(res3)) {
4902
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rgblib_send_btc_end" "', argument " "3"" of type '" "char const *""'");
4903
+ }
4904
+ arg3 = reinterpret_cast< char * >(buf3);ecode4 = SWIG_AsVal_bool(args[3], &val4);
4905
+ if (!SWIG_IsOK(ecode4)) {
4906
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "rgblib_send_btc_end" "', argument " "4"" of type '" "bool""'");
4907
+ }
4908
+ arg4 = static_cast< bool >(val4);result = rgblib_send_btc_end((COpaqueStruct const *)arg1,(COpaqueStruct const *)arg2,(char const *)arg3,arg4);
4909
+
4910
+ switch ((&result)->result) {
4911
+ case CResultValue::Ok:
4912
+ if ((&result)->inner == nullptr) {
4913
+ jsresult = v8::Null(v8::Isolate::GetCurrent());
4914
+ } else {
4915
+ jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
4916
+ delete ((&result)->inner);
4917
+ }
4918
+ break;
4919
+ case CResultValue::Err:
4920
+ SWIG_V8_Raise((const char*) (&result)->inner);
4921
+ break;
4922
+ }
4923
+
4924
+
4925
+
4926
+ if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4927
+
4928
+
4929
+ SWIGV8_RETURN(jsresult);
4930
+
4931
+ goto fail;
4932
+ fail:
4933
+ SWIGV8_RETURN(SWIGV8_UNDEFINED());
4934
+ }
4935
+
4936
+
4787
4937
  static SwigV8ReturnValue _wrap_rgblib_send_end(const SwigV8Arguments &args) {
4788
4938
  SWIGV8_HANDLESCOPE();
4789
4939
 
@@ -5805,6 +5955,8 @@ SWIGV8_AddStaticFunction(exports_obj, "rgblib_rotate_vanilla_address", _wrap_rgb
5805
5955
  SWIGV8_AddStaticFunction(exports_obj, "rgblib_send", _wrap_rgblib_send, context);
5806
5956
  SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_begin", _wrap_rgblib_send_begin, context);
5807
5957
  SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_btc", _wrap_rgblib_send_btc, context);
5958
+ SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_btc_begin", _wrap_rgblib_send_btc_begin, context);
5959
+ SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_btc_end", _wrap_rgblib_send_btc_end, context);
5808
5960
  SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_end", _wrap_rgblib_send_end, context);
5809
5961
  SWIGV8_AddStaticFunction(exports_obj, "rgblib_sign_psbt", _wrap_rgblib_sign_psbt, context);
5810
5962
  SWIGV8_AddStaticFunction(exports_obj, "rgblib_sync", _wrap_rgblib_sync, context);