How to use bindings

Comprehensive bindings code examples:

How to use bindings.closeWallet:

760
761
762
763
764
765
766
767
768
769
770
771
  return cb.promise
}


indy.closeWallet = function closeWallet (wh, cb) {
  cb = wrapIndyCallback(cb)
  capi.closeWallet(wh, cb)
  return cb.promise
}


indy.deleteWallet = function deleteWallet (config, credentials, cb) {

How to use bindings.UServerWrap:

259
260
261
262
263
264
265
266
267
268
269
270


	if (typeof cb === 'function')
		this.once('listening', cb);


	debug("creating UServerWrap");
	this._wrap = new uwrap.UServerWrap(this._wrapEvent.bind(this));
	debug("start UServerWrap#listen");
	this._wrap.listen(path, backlog);
};

How to use bindings.RSA_PKCS1_SALT_LEN_RECOVER:

745
746
747
748
749
750
751
    RSA_NO_PADDING:                 ursaNative.RSA_NO_PADDING,
    RSA_PKCS1_PADDING:              ursaNative.RSA_PKCS1_PADDING,
    RSA_PKCS1_OAEP_PADDING:         ursaNative.RSA_PKCS1_OAEP_PADDING,
    RSA_PKCS1_SALT_LEN_HLEN:        ursaNative.RSA_PKCS1_SALT_LEN_HLEN,
    RSA_PKCS1_SALT_LEN_MAX:         ursaNative.RSA_PKCS1_SALT_LEN_MAX,
    RSA_PKCS1_SALT_LEN_RECOVER:     ursaNative.RSA_PKCS1_SALT_LEN_RECOVER
};

How to use bindings.takeScreenshot:

72
73
74
75
76
77
78
79
80
81

// Use screen dimensions if not resolved
if (!width) width = screenWidth;
if (!height) height = screenHeight;

const result = addon.takeScreenshot(encoder, filenameAbsolute, quality, width, height);
if (result !== 0) {
	throw(new Error(errorCodes.get(result) || unknownError));
}
return {

How to use bindings.refreshPoolLedger:

706
707
708
709
710
711
712
713
714
715
716
717
  return cb.promise
}


indy.refreshPoolLedger = function refreshPoolLedger (handle, cb) {
  cb = wrapIndyCallback(cb)
  capi.refreshPoolLedger(handle, cb)
  return cb.promise
}


indy.listPools = function listPools (cb) {

How to use bindings.InputStream:

6
7
8
9
10
11
12
13
14
15
16
17
  return addon.getDevices();
};


exports.InputStream = class InputStream {
  constructor(options) {
    this._wrapped = new addon.InputStream(options || {});
  }


  start() {
    return this._wrapped.start();

How to use bindings.multiSignRequest:

342
343
344
345
346
347
348
349
350
351
352
353
  return cb.promise
}


indy.multiSignRequest = function multiSignRequest (wh, submitterDid, request, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.multiSignRequest(wh, submitterDid, toJson(request), cb)
  return cb.promise
}


indy.buildGetDdoRequest = function buildGetDdoRequest (submitterDid, targetDid, cb) {

How to use bindings.importWallet:

754
755
756
757
758
759
760
761
762
763
764
765
  return cb.promise
}


indy.importWallet = function importWallet (config, credentials, importConfig, cb) {
  cb = wrapIndyCallback(cb)
  capi.importWallet(toJson(config), toJson(credentials), toJson(importConfig), cb)
  return cb.promise
}


indy.closeWallet = function closeWallet (wh, cb) {

How to use bindings.buildVerifyPaymentReq:

682
683
684
685
686
687
688
689
690
691
692
693


indy.buildVerifyPaymentReq = function buildVerifyPaymentReq (wh, submitterDid, receipt, cb) {
  cb = wrapIndyCallback(cb, function (data) {
    return [fromJson(data[0]), data[1]]
  })
  capi.buildVerifyPaymentReq(wh, submitterDid, receipt, cb)
  return cb.promise
}


indy.parseVerifyPaymentResponse = function parseVerifyPaymentResponse (paymentMethod, resp, cb) {

How to use bindings.getWalletRecord:

544
545
546
547
548
549
550
551
552
553
554
555
  return cb.promise
}


indy.getWalletRecord = function getWalletRecord (wh, type, id, options, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.getWalletRecord(wh, type, id, toJson(options), cb)
  return cb.promise
}


indy.openWalletSearch = function openWalletSearch (wh, type, query, options, cb) {

How to use bindings.buildSchemaRequest:

378
379
380
381
382
383
384
385
386
387
388
389
  return cb.promise
}


indy.buildSchemaRequest = function buildSchemaRequest (submitterDid, data, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildSchemaRequest(submitterDid, toJson(data), cb)
  return cb.promise
}


indy.buildGetSchemaRequest = function buildGetSchemaRequest (submitterDid, id, cb) {

How to use bindings.buildRevocRegEntryRequest:

474
475
476
477
478
479
480
481
482
483
484
485
  return cb.promise
}


indy.buildRevocRegEntryRequest = function buildRevocRegEntryRequest (submitterDid, revocRegDefId, revDefType, value, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildRevocRegEntryRequest(submitterDid, revocRegDefId, revDefType, toJson(value), cb)
  return cb.promise
}


indy.buildGetRevocRegRequest = function buildGetRevocRegRequest (submitterDid, revocRegDefId, timestamp, cb) {

How to use bindings.buildRevocRegDefRequest:

454
455
456
457
458
459
460
461
462
463
464
465
  return cb.promise
}


indy.buildRevocRegDefRequest = function buildRevocRegDefRequest (submitterDid, data, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildRevocRegDefRequest(submitterDid, toJson(data), cb)
  return cb.promise
}


indy.buildGetRevocRegDefRequest = function buildGetRevocRegDefRequest (submitterDid, id, cb) {

How to use bindings.buildPoolRestartRequest:

442
443
444
445
446
447
448
449
450
451
452
453
  return cb.promise
}


indy.buildPoolRestartRequest = function buildPoolRestartRequest (submitterDid, action, datetime, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildPoolRestartRequest(submitterDid, action, datetime, cb)
  return cb.promise
}


indy.buildPoolUpgradeRequest = function buildPoolUpgradeRequest (submitterDid, name, version, action, sha256, timeout, schedule, justification, reinstall, force, package_, cb) {

How to use bindings.buildNymRequest:

354
355
356
357
358
359
360
361
362
363
364
365
  return cb.promise
}


indy.buildNymRequest = function buildNymRequest (submitterDid, targetDid, verkey, alias, role, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildNymRequest(submitterDid, targetDid, verkey, alias, role, cb)
  return cb.promise
}


indy.buildAttribRequest = function buildAttribRequest (submitterDid, targetDid, hash, raw, enc, cb) {

How to use bindings.buildMintReq:

656
657
658
659
660
661
662
663
664
665
666
667


indy.buildMintReq = function buildMintReq (wh, submitterDid, outputs, extra, cb) {
  cb = wrapIndyCallback(cb, function (data) {
    return [fromJson(data[0]), data[1]]
  })
  capi.buildMintReq(wh, submitterDid, toJson(outputs), extra, cb)
  return cb.promise
}


indy.buildSetTxnFeesReq = function buildSetTxnFeesReq (wh, submitterDid, paymentMethod, fees, cb) {

How to use bindings.buildGetTxnRequest:

430
431
432
433
434
435
436
437
438
439
440
441
  return cb.promise
}


indy.buildGetTxnRequest = function buildGetTxnRequest (submitterDid, ledgerType, data, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildGetTxnRequest(submitterDid, ledgerType, data, cb)
  return cb.promise
}


indy.buildPoolConfigRequest = function buildPoolConfigRequest (submitterDid, writes, force, cb) {

How to use bindings.buildGetSchemaRequest:

384
385
386
387
388
389
390
391
392
393
394
395
  return cb.promise
}


indy.buildGetSchemaRequest = function buildGetSchemaRequest (submitterDid, id, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildGetSchemaRequest(submitterDid, id, cb)
  return cb.promise
}


indy.parseGetSchemaResponse = function parseGetSchemaResponse (getSchemaResponse, cb) {

How to use bindings.buildGetRevocRegDeltaRequest:

494
495
496
497
498
499
500
501
502
503
504
505
  return cb.promise
}


indy.buildGetRevocRegDeltaRequest = function buildGetRevocRegDeltaRequest (submitterDid, revocRegDefId, from, to, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildGetRevocRegDeltaRequest(submitterDid, revocRegDefId, from, to, cb)
  return cb.promise
}


indy.parseGetRevocRegDeltaResponse = function parseGetRevocRegDeltaResponse (getRevocRegDeltaResponse, cb) {

How to use bindings.buildSetTxnFeesReq:

662
663
664
665
666
667
668
669
670
671
672
673
  return cb.promise
}


indy.buildSetTxnFeesReq = function buildSetTxnFeesReq (wh, submitterDid, paymentMethod, fees, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildSetTxnFeesReq(wh, submitterDid, paymentMethod, toJson(fees), cb)
  return cb.promise
}


indy.buildGetTxnFeesReq = function buildGetTxnFeesReq (wh, submitterDid, paymentMethod, cb) {

How to use bindings.buildGetPaymentSourcesRequest:

628
629
630
631
632
633
634
635
636
637
638
639


indy.buildGetPaymentSourcesRequest = function buildGetPaymentSourcesRequest (wh, submitterDid, paymentAddress, cb) {
  cb = wrapIndyCallback(cb, function (data) {
    return [fromJson(data[0]), data[1]]
  })
  capi.buildGetPaymentSourcesRequest(wh, submitterDid, paymentAddress, cb)
  return cb.promise
}


indy.parseGetPaymentSourcesResponse = function parseGetPaymentSourcesResponse (paymentMethod, resp, cb) {

How to use bindings.buildGetCredDefRequest:

404
405
406
407
408
409
410
411
412
413
414
415
  return cb.promise
}


indy.buildGetCredDefRequest = function buildGetCredDefRequest (submitterDid, id, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildGetCredDefRequest(submitterDid, id, cb)
  return cb.promise
}


indy.parseGetCredDefResponse = function parseGetCredDefResponse (getCredDefResponse, cb) {

How to use bindings.buildPoolUpgradeRequest:

448
449
450
451
452
453
454
455
456
457
458
459
  return cb.promise
}


indy.buildPoolUpgradeRequest = function buildPoolUpgradeRequest (submitterDid, name, version, action, sha256, timeout, schedule, justification, reinstall, force, package_, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildPoolUpgradeRequest(submitterDid, name, version, action, sha256, timeout, schedule, justification, reinstall, force, package_, cb)
  return cb.promise
}


indy.buildRevocRegDefRequest = function buildRevocRegDefRequest (submitterDid, data, cb) {

How to use bindings.buildGetAttribRequest:

366
367
368
369
370
371
372
373
374
375
376
377
  return cb.promise
}


indy.buildGetAttribRequest = function buildGetAttribRequest (submitterDid, targetDid, hash, raw, enc, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildGetAttribRequest(submitterDid, targetDid, hash, raw, enc, cb)
  return cb.promise
}


indy.buildGetNymRequest = function buildGetNymRequest (submitterDid, targetDid, cb) {

How to use bindings.buildPoolConfigRequest:

436
437
438
439
440
441
442
443
444
445
446
447
  return cb.promise
}


indy.buildPoolConfigRequest = function buildPoolConfigRequest (submitterDid, writes, force, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildPoolConfigRequest(submitterDid, writes, force, cb)
  return cb.promise
}


indy.buildPoolRestartRequest = function buildPoolRestartRequest (submitterDid, action, datetime, cb) {

How to use bindings.buildPaymentReq:

642
643
644
645
646
647
648
649
650
651
652
653


indy.buildPaymentReq = function buildPaymentReq (wh, submitterDid, inputs, outputs, extra, cb) {
  cb = wrapIndyCallback(cb, function (data) {
    return [fromJson(data[0]), data[1]]
  })
  capi.buildPaymentReq(wh, submitterDid, toJson(inputs), toJson(outputs), extra, cb)
  return cb.promise
}


indy.parsePaymentResponse = function parsePaymentResponse (paymentMethod, resp, cb) {

How to use bindings.buildNodeRequest:

418
419
420
421
422
423
424
425
426
427
428
429
  return cb.promise
}


indy.buildNodeRequest = function buildNodeRequest (submitterDid, targetDid, data, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildNodeRequest(submitterDid, targetDid, toJson(data), cb)
  return cb.promise
}


indy.buildGetValidatorInfoRequest = function buildGetValidatorInfoRequest (submitterDid, cb) {

How to use bindings.buildGetValidatorInfoRequest:

424
425
426
427
428
429
430
431
432
433
434
435
  return cb.promise
}


indy.buildGetValidatorInfoRequest = function buildGetValidatorInfoRequest (submitterDid, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildGetValidatorInfoRequest(submitterDid, cb)
  return cb.promise
}


indy.buildGetTxnRequest = function buildGetTxnRequest (submitterDid, ledgerType, data, cb) {

How to use bindings.buildGetTxnFeesReq:

668
669
670
671
672
673
674
675
676
677
678
679
  return cb.promise
}


indy.buildGetTxnFeesReq = function buildGetTxnFeesReq (wh, submitterDid, paymentMethod, cb) {
  cb = wrapIndyCallback(cb, fromJson)
  capi.buildGetTxnFeesReq(wh, submitterDid, paymentMethod, cb)
  return cb.promise
}


indy.parseGetTxnFeesResponse = function parseGetTxnFeesResponse (paymentMethod, resp, cb) {

bindings functions:

Sorted by popularity