@utexo/rgb-lib-linux-x64 0.3.0-beta.14 → 0.3.0-beta.14.vss
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
|
@@ -226,6 +226,11 @@ CResultString rgblib_validate_consignment(const char *file_path,
|
|
|
226
226
|
const char *indexer_url,
|
|
227
227
|
const char *bitcoin_network);
|
|
228
228
|
|
|
229
|
+
CResultString rgblib_validate_consignment_offchain(const char *file_path,
|
|
230
|
+
const char *txid,
|
|
231
|
+
const char *indexer_url,
|
|
232
|
+
const char *bitcoin_network);
|
|
233
|
+
|
|
229
234
|
CResultString rgblib_vss_backup(const COpaqueStruct *wallet, const COpaqueStruct *client);
|
|
230
235
|
|
|
231
236
|
CResultString rgblib_vss_backup_client_encryption_enabled(const COpaqueStruct *client);
|
|
Binary file
|
package/swig_wrap.cxx
CHANGED
|
@@ -5055,6 +5055,75 @@ fail:
|
|
|
5055
5055
|
}
|
|
5056
5056
|
|
|
5057
5057
|
|
|
5058
|
+
static SwigV8ReturnValue _wrap_rgblib_validate_consignment_offchain(const SwigV8Arguments &args) {
|
|
5059
|
+
SWIGV8_HANDLESCOPE();
|
|
5060
|
+
|
|
5061
|
+
SWIGV8_VALUE jsresult;
|
|
5062
|
+
char *arg1 = (char *) 0 ;
|
|
5063
|
+
char *arg2 = (char *) 0 ;
|
|
5064
|
+
char *arg3 = (char *) 0 ;
|
|
5065
|
+
char *arg4 = (char *) 0 ;
|
|
5066
|
+
int res1 ;
|
|
5067
|
+
char *buf1 = 0 ;
|
|
5068
|
+
int alloc1 = 0 ;
|
|
5069
|
+
int res2 ;
|
|
5070
|
+
char *buf2 = 0 ;
|
|
5071
|
+
int alloc2 = 0 ;
|
|
5072
|
+
int res3 ;
|
|
5073
|
+
char *buf3 = 0 ;
|
|
5074
|
+
int alloc3 = 0 ;
|
|
5075
|
+
int res4 ;
|
|
5076
|
+
char *buf4 = 0 ;
|
|
5077
|
+
int alloc4 = 0 ;
|
|
5078
|
+
CResultString result;
|
|
5079
|
+
|
|
5080
|
+
if (args.Length() < 4 || args.Length() > 4) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for _wrap_rgblib_validate_consignment_offchain.");
|
|
5081
|
+
|
|
5082
|
+
res1 = SWIG_AsCharPtrAndSize(args[0], &buf1, NULL, &alloc1);
|
|
5083
|
+
if (!SWIG_IsOK(res1)) {
|
|
5084
|
+
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rgblib_validate_consignment_offchain" "', argument " "1"" of type '" "char const *""'");
|
|
5085
|
+
}
|
|
5086
|
+
arg1 = reinterpret_cast< char * >(buf1);res2 = SWIG_AsCharPtrAndSize(args[1], &buf2, NULL, &alloc2);
|
|
5087
|
+
if (!SWIG_IsOK(res2)) {
|
|
5088
|
+
SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rgblib_validate_consignment_offchain" "', argument " "2"" of type '" "char const *""'");
|
|
5089
|
+
}
|
|
5090
|
+
arg2 = reinterpret_cast< char * >(buf2);res3 = SWIG_AsCharPtrAndSize(args[2], &buf3, NULL, &alloc3);
|
|
5091
|
+
if (!SWIG_IsOK(res3)) {
|
|
5092
|
+
SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rgblib_validate_consignment_offchain" "', argument " "3"" of type '" "char const *""'");
|
|
5093
|
+
}
|
|
5094
|
+
arg3 = reinterpret_cast< char * >(buf3);res4 = SWIG_AsCharPtrAndSize(args[3], &buf4, NULL, &alloc4);
|
|
5095
|
+
if (!SWIG_IsOK(res4)) {
|
|
5096
|
+
SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "rgblib_validate_consignment_offchain" "', argument " "4"" of type '" "char const *""'");
|
|
5097
|
+
}
|
|
5098
|
+
arg4 = reinterpret_cast< char * >(buf4);result = rgblib_validate_consignment_offchain((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
|
|
5099
|
+
|
|
5100
|
+
switch ((&result)->result) {
|
|
5101
|
+
case CResultValue::Ok:
|
|
5102
|
+
if ((&result)->inner == nullptr) {
|
|
5103
|
+
jsresult = v8::Null(v8::Isolate::GetCurrent());
|
|
5104
|
+
} else {
|
|
5105
|
+
jsresult = v8::String::NewFromUtf8(args.GetIsolate(), (const char*) (&result)->inner).ToLocalChecked();
|
|
5106
|
+
delete ((&result)->inner);
|
|
5107
|
+
}
|
|
5108
|
+
break;
|
|
5109
|
+
case CResultValue::Err:
|
|
5110
|
+
SWIG_V8_Raise((const char*) (&result)->inner);
|
|
5111
|
+
break;
|
|
5112
|
+
}
|
|
5113
|
+
|
|
5114
|
+
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
|
5115
|
+
if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
|
|
5116
|
+
if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
|
|
5117
|
+
if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
|
|
5118
|
+
|
|
5119
|
+
SWIGV8_RETURN(jsresult);
|
|
5120
|
+
|
|
5121
|
+
goto fail;
|
|
5122
|
+
fail:
|
|
5123
|
+
SWIGV8_RETURN(SWIGV8_UNDEFINED());
|
|
5124
|
+
}
|
|
5125
|
+
|
|
5126
|
+
|
|
5058
5127
|
static SwigV8ReturnValue _wrap_rgblib_vss_backup(const SwigV8Arguments &args) {
|
|
5059
5128
|
SWIGV8_HANDLESCOPE();
|
|
5060
5129
|
|
|
@@ -5790,6 +5859,7 @@ SWIGV8_AddStaticFunction(exports_obj, "rgblib_send_end", _wrap_rgblib_send_end,
|
|
|
5790
5859
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_sign_psbt", _wrap_rgblib_sign_psbt, context);
|
|
5791
5860
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_sync", _wrap_rgblib_sync, context);
|
|
5792
5861
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_validate_consignment", _wrap_rgblib_validate_consignment, context);
|
|
5862
|
+
SWIGV8_AddStaticFunction(exports_obj, "rgblib_validate_consignment_offchain", _wrap_rgblib_validate_consignment_offchain, context);
|
|
5793
5863
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_vss_backup", _wrap_rgblib_vss_backup, context);
|
|
5794
5864
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_vss_backup_client_encryption_enabled", _wrap_rgblib_vss_backup_client_encryption_enabled, context);
|
|
5795
5865
|
SWIGV8_AddStaticFunction(exports_obj, "rgblib_vss_backup_info", _wrap_rgblib_vss_backup_info, context);
|
package/wrapper.js
CHANGED
|
@@ -898,6 +898,34 @@ exports.validateConsignment = function validateConsignment(filePath, indexerUrl,
|
|
|
898
898
|
);
|
|
899
899
|
};
|
|
900
900
|
|
|
901
|
+
exports.validateConsignmentOffchain = function validateConsignmentOffchain(
|
|
902
|
+
filePath,
|
|
903
|
+
txid,
|
|
904
|
+
indexerUrl,
|
|
905
|
+
bitcoinNetwork,
|
|
906
|
+
) {
|
|
907
|
+
const params = { filePath, txid, indexerUrl, bitcoinNetwork };
|
|
908
|
+
const expectedTypes = {
|
|
909
|
+
filePath: "string",
|
|
910
|
+
txid: "string",
|
|
911
|
+
indexerUrl: "string",
|
|
912
|
+
bitcoinNetwork: "string",
|
|
913
|
+
};
|
|
914
|
+
validateTypes(params, expectedTypes);
|
|
915
|
+
validateEnumValues(
|
|
916
|
+
{ bitcoinNetwork },
|
|
917
|
+
{ bitcoinNetwork: BitcoinNetwork },
|
|
918
|
+
);
|
|
919
|
+
return JSON.parse(
|
|
920
|
+
lib.rgblib_validate_consignment_offchain(
|
|
921
|
+
filePath,
|
|
922
|
+
txid,
|
|
923
|
+
indexerUrl,
|
|
924
|
+
bitcoinNetwork,
|
|
925
|
+
),
|
|
926
|
+
);
|
|
927
|
+
};
|
|
928
|
+
|
|
901
929
|
exports.Invoice = class Invoice {
|
|
902
930
|
constructor(invoiceString) {
|
|
903
931
|
const params = { invoiceString };
|