@maxandriani/indy-besu-vdr-nodejs 0.1.0 → 0.2.0
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/indy_besu_vdr_wasm.d.ts +20 -19
- package/indy_besu_vdr_wasm.js +67 -38
- package/indy_besu_vdr_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/indy_besu_vdr_wasm.d.ts
CHANGED
|
@@ -320,7 +320,7 @@ export class CredentialDefinitionRegistry {
|
|
|
320
320
|
[Symbol.dispose](): void;
|
|
321
321
|
static resolveCredentialDefinition(client: LedgerClient, id: string): Promise<CredentialDefinition>;
|
|
322
322
|
static parseResolveCredentialDefinitionResult(client: LedgerClient, bytes: Uint8Array): CredentialDefinitionRecord;
|
|
323
|
-
static buildCreateCredentialDefinitionTransaction(client: LedgerClient, from: string, cred_def: CredentialDefinition): Promise<Transaction>;
|
|
323
|
+
static buildCreateCredentialDefinitionTransaction(client: LedgerClient, from: string, cred_def: CredentialDefinition, nonce?: bigint | null): Promise<Transaction>;
|
|
324
324
|
static buildResolveCredentialDefinitionTransaction(client: LedgerClient, id: string): Promise<Transaction>;
|
|
325
325
|
static buildCreateCredentialDefinitionEndorsingData(client: LedgerClient, cred_def: CredentialDefinition): Promise<TransactionEndorsingData>;
|
|
326
326
|
}
|
|
@@ -336,7 +336,7 @@ export class Endorsement {
|
|
|
336
336
|
private constructor();
|
|
337
337
|
free(): void;
|
|
338
338
|
[Symbol.dispose](): void;
|
|
339
|
-
static buildEndorsementTransaction(client: LedgerClient, from: string, endorsing_data: TransactionEndorsingData): Promise<Transaction>;
|
|
339
|
+
static buildEndorsementTransaction(client: LedgerClient, from: string, endorsing_data: TransactionEndorsingData, nonce?: bigint | null): Promise<Transaction>;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
export class EthrDidRegistry {
|
|
@@ -349,14 +349,14 @@ export class EthrDidRegistry {
|
|
|
349
349
|
static buildGetDidEventsQuery(client: LedgerClient, did: string, from_block?: bigint | null, to_block?: bigint | null): Promise<EventQuery>;
|
|
350
350
|
static buildGetDidOwnerTransaction(client: LedgerClient, did: string): Promise<Transaction>;
|
|
351
351
|
static buildGetDidChangedTransaction(client: LedgerClient, did: string): Promise<Transaction>;
|
|
352
|
-
static buildDidAddDelegateTransaction(client: LedgerClient, sender: string, did: string, delegate_type: string, delegate: string, validity: bigint): Promise<Transaction>;
|
|
353
|
-
static buildDidChangeOwnerTransaction(client: LedgerClient, sender: string, did: string, new_owner: string): Promise<Transaction>;
|
|
354
|
-
static buildDidSetAttributeTransaction(client: LedgerClient, sender: string, did: string, attribute: DidDocAttribute, validity: bigint): Promise<Transaction>;
|
|
352
|
+
static buildDidAddDelegateTransaction(client: LedgerClient, sender: string, did: string, delegate_type: string, delegate: string, validity: bigint, nonce?: bigint | null): Promise<Transaction>;
|
|
353
|
+
static buildDidChangeOwnerTransaction(client: LedgerClient, sender: string, did: string, new_owner: string, nonce?: bigint | null): Promise<Transaction>;
|
|
354
|
+
static buildDidSetAttributeTransaction(client: LedgerClient, sender: string, did: string, attribute: DidDocAttribute, validity: bigint, nonce?: bigint | null): Promise<Transaction>;
|
|
355
355
|
static buildGetIdentityNonceTransaction(client: LedgerClient, identity: string): Promise<Transaction>;
|
|
356
356
|
static buildDidAddDelegateEndorsingData(client: LedgerClient, did: string, delegate_type: string, delegate: string, validity: bigint): Promise<TransactionEndorsingData>;
|
|
357
357
|
static buildDidChangeOwnerEndorsingData(client: LedgerClient, did: string, new_owner: string): Promise<TransactionEndorsingData>;
|
|
358
|
-
static buildDidRevokeDelegateTransaction(client: LedgerClient, sender: string, did: string, delegate_type: string, delegate: string): Promise<Transaction>;
|
|
359
|
-
static buildDidRevokeAttributeTransaction(client: LedgerClient, sender: string, did: string, attribute: DidDocAttribute): Promise<Transaction>;
|
|
358
|
+
static buildDidRevokeDelegateTransaction(client: LedgerClient, sender: string, did: string, delegate_type: string, delegate: string, nonce?: bigint | null): Promise<Transaction>;
|
|
359
|
+
static buildDidRevokeAttributeTransaction(client: LedgerClient, sender: string, did: string, attribute: DidDocAttribute, nonce?: bigint | null): Promise<Transaction>;
|
|
360
360
|
static buildDidSetAttributeEndorsingData(client: LedgerClient, did: string, attribute: DidDocAttribute, validity: bigint): Promise<TransactionEndorsingData>;
|
|
361
361
|
static parseDidOwnerChangedEventResponse(client: LedgerClient, log: EventLog): DidOwnerChanged;
|
|
362
362
|
static buildDidRevokeDelegateEndorsingData(client: LedgerClient, did: string, delegate_type: string, delegate: string): Promise<TransactionEndorsingData>;
|
|
@@ -376,12 +376,12 @@ export class IndyDidRegistry {
|
|
|
376
376
|
free(): void;
|
|
377
377
|
[Symbol.dispose](): void;
|
|
378
378
|
static parseResolveDidResult(client: LedgerClient, bytes: Uint8Array): DidRecord;
|
|
379
|
-
static buildCreateDidTransaction(client: LedgerClient, from: string, did: string, did_doc: DidDocument): Promise<Transaction>;
|
|
380
|
-
static buildUpdateDidTransaction(client: LedgerClient, from: string, did: string, did_doc: DidDocument): Promise<Transaction>;
|
|
379
|
+
static buildCreateDidTransaction(client: LedgerClient, from: string, did: string, did_doc: DidDocument, nonce?: bigint | null): Promise<Transaction>;
|
|
380
|
+
static buildUpdateDidTransaction(client: LedgerClient, from: string, did: string, did_doc: DidDocument, nonce?: bigint | null): Promise<Transaction>;
|
|
381
381
|
static buildResolveDidTransaction(client: LedgerClient, did: string): Promise<Transaction>;
|
|
382
382
|
static buildCreateDidEndorsingData(client: LedgerClient, did: string, did_doc: DidDocument): Promise<TransactionEndorsingData>;
|
|
383
383
|
static buildUpdateDidEndorsingData(client: LedgerClient, did: string, did_doc: DidDocument): Promise<TransactionEndorsingData>;
|
|
384
|
-
static buildDeactivateDidTransaction(client: LedgerClient, from: string, did: string): Promise<Transaction>;
|
|
384
|
+
static buildDeactivateDidTransaction(client: LedgerClient, from: string, did: string, nonce?: bigint | null): Promise<Transaction>;
|
|
385
385
|
static buildDeactivateDidEndorsingData(client: LedgerClient, did: string): Promise<TransactionEndorsingData>;
|
|
386
386
|
}
|
|
387
387
|
|
|
@@ -391,6 +391,7 @@ export class LedgerClient {
|
|
|
391
391
|
getReceipt(hash: Uint8Array): Promise<string>;
|
|
392
392
|
queryEvents(query: EventQuery): Promise<EventLog[]>;
|
|
393
393
|
submitTransaction(transaction: Transaction): Promise<number[]>;
|
|
394
|
+
getTransactionCount(address: string): Promise<bigint>;
|
|
394
395
|
constructor(chain_id: number, node_address: string, contract_configs: ContractConfig[], network: string | null | undefined, quorum_config: QuorumConfig | undefined | null);
|
|
395
396
|
ping(): Promise<PingStatus>;
|
|
396
397
|
}
|
|
@@ -402,10 +403,10 @@ export class LegacyMappingRegistry {
|
|
|
402
403
|
static parseDidMappingResult(client: LedgerClient, bytes: Uint8Array): string;
|
|
403
404
|
static parseResourceMappingResult(client: LedgerClient, bytes: Uint8Array): string;
|
|
404
405
|
static buildGetDidMappingTransaction(client: LedgerClient, legacy_identifier: string): Promise<Transaction>;
|
|
405
|
-
static buildCreateDidMappingTransaction(client: LedgerClient, from: string, did: string, legacy_did: string, legacy_verkey: string, ed25519_signature: Uint8Array): Promise<Transaction>;
|
|
406
|
+
static buildCreateDidMappingTransaction(client: LedgerClient, from: string, did: string, legacy_did: string, legacy_verkey: string, ed25519_signature: Uint8Array, nonce?: bigint | null): Promise<Transaction>;
|
|
406
407
|
static buildGetResourceMappingTransaction(client: LedgerClient, legacy_identifier: string): Promise<Transaction>;
|
|
407
408
|
static buildCreateDidMappingEndorsingData(client: LedgerClient, did: string, legacy_did: string, legacy_verkey: string, ed25519_signature: Uint8Array): Promise<TransactionEndorsingData>;
|
|
408
|
-
static buildCreateResourceMappingTransaction(client: LedgerClient, from: string, did: string, legacy_issuer_identifier: string, legacy_identifier: string, new_identifier: string): Promise<Transaction>;
|
|
409
|
+
static buildCreateResourceMappingTransaction(client: LedgerClient, from: string, did: string, legacy_issuer_identifier: string, legacy_identifier: string, new_identifier: string, nonce?: bigint | null): Promise<Transaction>;
|
|
409
410
|
static buildCreateResourceMappingEndorsingData(client: LedgerClient, did: string, legacy_issuer_identifier: string, legacy_identifier: string, new_identifier: string): Promise<TransactionEndorsingData>;
|
|
410
411
|
}
|
|
411
412
|
|
|
@@ -415,10 +416,10 @@ export class RevocationRegistry {
|
|
|
415
416
|
[Symbol.dispose](): void;
|
|
416
417
|
static resolveRevocationRegistryDefinition(client: LedgerClient, id: string): Promise<RevocationRegistryDefinition>;
|
|
417
418
|
static resolveRevocationRegistryStatusList(client: LedgerClient, id: string, to_timestamp: bigint): Promise<RevocationRegistryStatusList>;
|
|
418
|
-
static buildCreateRevocationRegistryEntryTransaction(client: LedgerClient, from: string, rev_reg_entry: RevocationRegistryEntry): Promise<Transaction>;
|
|
419
|
+
static buildCreateRevocationRegistryEntryTransaction(client: LedgerClient, from: string, rev_reg_entry: RevocationRegistryEntry, nonce?: bigint | null): Promise<Transaction>;
|
|
419
420
|
static parseResolveRevocationRegistryDefinitionResult(client: LedgerClient, bytes: Uint8Array): RevocationRegistryDefinitionRecord;
|
|
420
421
|
static buildCreateRevocationRegistryEntryEndorsingData(client: LedgerClient, rev_reg_entry: RevocationRegistryEntry): Promise<TransactionEndorsingData>;
|
|
421
|
-
static buildCreateRevocationRegistryDefinitionTransaction(client: LedgerClient, from: string, rev_reg_def: RevocationRegistryDefinition): Promise<Transaction>;
|
|
422
|
+
static buildCreateRevocationRegistryDefinitionTransaction(client: LedgerClient, from: string, rev_reg_def: RevocationRegistryDefinition, nonce?: bigint | null): Promise<Transaction>;
|
|
422
423
|
static buildLatestRevocationRegistryEntryFromStatusList(client: LedgerClient, id: string, revocation_registry_status_list: Uint8Array, accumulator: string): Promise<RevocationRegistryEntry>;
|
|
423
424
|
static buildResolveRevocationRegistryDefinitionTransaction(client: LedgerClient, id: string): Promise<Transaction>;
|
|
424
425
|
static buildCreateRevocationRegistryDefinitionEndorsingData(client: LedgerClient, rev_reg_def: RevocationRegistryDefinition): Promise<TransactionEndorsingData>;
|
|
@@ -458,8 +459,8 @@ export class RoleControl {
|
|
|
458
459
|
static parseHasRoleResult(client: LedgerClient, bytes: Uint8Array): boolean;
|
|
459
460
|
static buildGetRoleTransaction(client: LedgerClient, account: string): Promise<Transaction>;
|
|
460
461
|
static buildHasRoleTransaction(client: LedgerClient, role: number, account: string): Promise<Transaction>;
|
|
461
|
-
static buildAssignRoleTransaction(client: LedgerClient, from: string, role: number, account: string): Promise<Transaction>;
|
|
462
|
-
static buildRevokeRoleTransaction(client: LedgerClient, from: string, role: number, account: string): Promise<Transaction>;
|
|
462
|
+
static buildAssignRoleTransaction(client: LedgerClient, from: string, role: number, account: string, nonce?: bigint | null): Promise<Transaction>;
|
|
463
|
+
static buildRevokeRoleTransaction(client: LedgerClient, from: string, role: number, account: string, nonce?: bigint | null): Promise<Transaction>;
|
|
463
464
|
}
|
|
464
465
|
|
|
465
466
|
export class Schema {
|
|
@@ -478,7 +479,7 @@ export class SchemaRegistry {
|
|
|
478
479
|
[Symbol.dispose](): void;
|
|
479
480
|
static resolveSchema(client: LedgerClient, id: string): Promise<Schema>;
|
|
480
481
|
static parseResolveSchemaResult(client: LedgerClient, bytes: Uint8Array): SchemaRecord;
|
|
481
|
-
static buildCreateSchemaTransaction(client: LedgerClient, from: string, schema: Schema): Promise<Transaction>;
|
|
482
|
+
static buildCreateSchemaTransaction(client: LedgerClient, from: string, schema: Schema, nonce?: bigint | null): Promise<Transaction>;
|
|
482
483
|
static buildResolveSchemaTransaction(client: LedgerClient, id: string): Promise<Transaction>;
|
|
483
484
|
static buildCreateSchemaEndorsingData(client: LedgerClient, schema: Schema): Promise<TransactionEndorsingData>;
|
|
484
485
|
}
|
|
@@ -505,7 +506,7 @@ export class ValidatorControl {
|
|
|
505
506
|
free(): void;
|
|
506
507
|
[Symbol.dispose](): void;
|
|
507
508
|
static parseGetValidatorsResult(client: LedgerClient, bytes: Uint8Array): AddressString[];
|
|
508
|
-
static buildAddValidatorTransaction(client: LedgerClient, from: string, validator_address: string): Promise<Transaction>;
|
|
509
|
+
static buildAddValidatorTransaction(client: LedgerClient, from: string, validator_address: string, nonce?: bigint | null): Promise<Transaction>;
|
|
509
510
|
static buildGetValidatorsTransaction(client: LedgerClient): Promise<Transaction>;
|
|
510
|
-
static buildRemoveValidatorTransaction(client: LedgerClient, from: string, validator_address: string): Promise<Transaction>;
|
|
511
|
+
static buildRemoveValidatorTransaction(client: LedgerClient, from: string, validator_address: string, nonce?: bigint | null): Promise<Transaction>;
|
|
511
512
|
}
|
package/indy_besu_vdr_wasm.js
CHANGED
|
@@ -483,14 +483,15 @@ class CredentialDefinitionRegistry {
|
|
|
483
483
|
* @param {LedgerClient} client
|
|
484
484
|
* @param {string} from
|
|
485
485
|
* @param {CredentialDefinition} cred_def
|
|
486
|
+
* @param {bigint | null} [nonce]
|
|
486
487
|
* @returns {Promise<Transaction>}
|
|
487
488
|
*/
|
|
488
|
-
static buildCreateCredentialDefinitionTransaction(client, from, cred_def) {
|
|
489
|
+
static buildCreateCredentialDefinitionTransaction(client, from, cred_def, nonce) {
|
|
489
490
|
_assertClass(client, LedgerClient);
|
|
490
491
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
491
492
|
const len0 = WASM_VECTOR_LEN;
|
|
492
493
|
_assertClass(cred_def, CredentialDefinition);
|
|
493
|
-
const ret = wasm.credentialdefinitionregistry_buildCreateCredentialDefinitionTransaction(client.__wbg_ptr, ptr0, len0, cred_def.__wbg_ptr);
|
|
494
|
+
const ret = wasm.credentialdefinitionregistry_buildCreateCredentialDefinitionTransaction(client.__wbg_ptr, ptr0, len0, cred_def.__wbg_ptr, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
494
495
|
return ret;
|
|
495
496
|
}
|
|
496
497
|
/**
|
|
@@ -563,14 +564,15 @@ class Endorsement {
|
|
|
563
564
|
* @param {LedgerClient} client
|
|
564
565
|
* @param {string} from
|
|
565
566
|
* @param {TransactionEndorsingData} endorsing_data
|
|
567
|
+
* @param {bigint | null} [nonce]
|
|
566
568
|
* @returns {Promise<Transaction>}
|
|
567
569
|
*/
|
|
568
|
-
static buildEndorsementTransaction(client, from, endorsing_data) {
|
|
570
|
+
static buildEndorsementTransaction(client, from, endorsing_data, nonce) {
|
|
569
571
|
_assertClass(client, LedgerClient);
|
|
570
572
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
571
573
|
const len0 = WASM_VECTOR_LEN;
|
|
572
574
|
_assertClass(endorsing_data, TransactionEndorsingData);
|
|
573
|
-
const ret = wasm.endorsement_buildEndorsementTransaction(client.__wbg_ptr, ptr0, len0, endorsing_data.__wbg_ptr);
|
|
575
|
+
const ret = wasm.endorsement_buildEndorsementTransaction(client.__wbg_ptr, ptr0, len0, endorsing_data.__wbg_ptr, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
574
576
|
return ret;
|
|
575
577
|
}
|
|
576
578
|
}
|
|
@@ -687,9 +689,10 @@ class EthrDidRegistry {
|
|
|
687
689
|
* @param {string} delegate_type
|
|
688
690
|
* @param {string} delegate
|
|
689
691
|
* @param {bigint} validity
|
|
692
|
+
* @param {bigint | null} [nonce]
|
|
690
693
|
* @returns {Promise<Transaction>}
|
|
691
694
|
*/
|
|
692
|
-
static buildDidAddDelegateTransaction(client, sender, did, delegate_type, delegate, validity) {
|
|
695
|
+
static buildDidAddDelegateTransaction(client, sender, did, delegate_type, delegate, validity, nonce) {
|
|
693
696
|
_assertClass(client, LedgerClient);
|
|
694
697
|
const ptr0 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
695
698
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -699,7 +702,7 @@ class EthrDidRegistry {
|
|
|
699
702
|
const len2 = WASM_VECTOR_LEN;
|
|
700
703
|
const ptr3 = passStringToWasm0(delegate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
701
704
|
const len3 = WASM_VECTOR_LEN;
|
|
702
|
-
const ret = wasm.ethrdidregistry_buildDidAddDelegateTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, validity);
|
|
705
|
+
const ret = wasm.ethrdidregistry_buildDidAddDelegateTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, validity, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
703
706
|
return ret;
|
|
704
707
|
}
|
|
705
708
|
/**
|
|
@@ -707,9 +710,10 @@ class EthrDidRegistry {
|
|
|
707
710
|
* @param {string} sender
|
|
708
711
|
* @param {string} did
|
|
709
712
|
* @param {string} new_owner
|
|
713
|
+
* @param {bigint | null} [nonce]
|
|
710
714
|
* @returns {Promise<Transaction>}
|
|
711
715
|
*/
|
|
712
|
-
static buildDidChangeOwnerTransaction(client, sender, did, new_owner) {
|
|
716
|
+
static buildDidChangeOwnerTransaction(client, sender, did, new_owner, nonce) {
|
|
713
717
|
_assertClass(client, LedgerClient);
|
|
714
718
|
const ptr0 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
715
719
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -717,7 +721,7 @@ class EthrDidRegistry {
|
|
|
717
721
|
const len1 = WASM_VECTOR_LEN;
|
|
718
722
|
const ptr2 = passStringToWasm0(new_owner, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
719
723
|
const len2 = WASM_VECTOR_LEN;
|
|
720
|
-
const ret = wasm.ethrdidregistry_buildDidChangeOwnerTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
724
|
+
const ret = wasm.ethrdidregistry_buildDidChangeOwnerTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
721
725
|
return ret;
|
|
722
726
|
}
|
|
723
727
|
/**
|
|
@@ -726,15 +730,16 @@ class EthrDidRegistry {
|
|
|
726
730
|
* @param {string} did
|
|
727
731
|
* @param {DidDocAttribute} attribute
|
|
728
732
|
* @param {bigint} validity
|
|
733
|
+
* @param {bigint | null} [nonce]
|
|
729
734
|
* @returns {Promise<Transaction>}
|
|
730
735
|
*/
|
|
731
|
-
static buildDidSetAttributeTransaction(client, sender, did, attribute, validity) {
|
|
736
|
+
static buildDidSetAttributeTransaction(client, sender, did, attribute, validity, nonce) {
|
|
732
737
|
_assertClass(client, LedgerClient);
|
|
733
738
|
const ptr0 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
734
739
|
const len0 = WASM_VECTOR_LEN;
|
|
735
740
|
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
736
741
|
const len1 = WASM_VECTOR_LEN;
|
|
737
|
-
const ret = wasm.ethrdidregistry_buildDidSetAttributeTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, attribute, validity);
|
|
742
|
+
const ret = wasm.ethrdidregistry_buildDidSetAttributeTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, attribute, validity, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
738
743
|
return ret;
|
|
739
744
|
}
|
|
740
745
|
/**
|
|
@@ -789,9 +794,10 @@ class EthrDidRegistry {
|
|
|
789
794
|
* @param {string} did
|
|
790
795
|
* @param {string} delegate_type
|
|
791
796
|
* @param {string} delegate
|
|
797
|
+
* @param {bigint | null} [nonce]
|
|
792
798
|
* @returns {Promise<Transaction>}
|
|
793
799
|
*/
|
|
794
|
-
static buildDidRevokeDelegateTransaction(client, sender, did, delegate_type, delegate) {
|
|
800
|
+
static buildDidRevokeDelegateTransaction(client, sender, did, delegate_type, delegate, nonce) {
|
|
795
801
|
_assertClass(client, LedgerClient);
|
|
796
802
|
const ptr0 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
797
803
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -801,7 +807,7 @@ class EthrDidRegistry {
|
|
|
801
807
|
const len2 = WASM_VECTOR_LEN;
|
|
802
808
|
const ptr3 = passStringToWasm0(delegate, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
803
809
|
const len3 = WASM_VECTOR_LEN;
|
|
804
|
-
const ret = wasm.ethrdidregistry_buildDidRevokeDelegateTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
810
|
+
const ret = wasm.ethrdidregistry_buildDidRevokeDelegateTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
805
811
|
return ret;
|
|
806
812
|
}
|
|
807
813
|
/**
|
|
@@ -809,15 +815,16 @@ class EthrDidRegistry {
|
|
|
809
815
|
* @param {string} sender
|
|
810
816
|
* @param {string} did
|
|
811
817
|
* @param {DidDocAttribute} attribute
|
|
818
|
+
* @param {bigint | null} [nonce]
|
|
812
819
|
* @returns {Promise<Transaction>}
|
|
813
820
|
*/
|
|
814
|
-
static buildDidRevokeAttributeTransaction(client, sender, did, attribute) {
|
|
821
|
+
static buildDidRevokeAttributeTransaction(client, sender, did, attribute, nonce) {
|
|
815
822
|
_assertClass(client, LedgerClient);
|
|
816
823
|
const ptr0 = passStringToWasm0(sender, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
817
824
|
const len0 = WASM_VECTOR_LEN;
|
|
818
825
|
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
819
826
|
const len1 = WASM_VECTOR_LEN;
|
|
820
|
-
const ret = wasm.ethrdidregistry_buildDidRevokeAttributeTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, attribute);
|
|
827
|
+
const ret = wasm.ethrdidregistry_buildDidRevokeAttributeTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, attribute, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
821
828
|
return ret;
|
|
822
829
|
}
|
|
823
830
|
/**
|
|
@@ -961,15 +968,16 @@ class IndyDidRegistry {
|
|
|
961
968
|
* @param {string} from
|
|
962
969
|
* @param {string} did
|
|
963
970
|
* @param {DidDocument} did_doc
|
|
971
|
+
* @param {bigint | null} [nonce]
|
|
964
972
|
* @returns {Promise<Transaction>}
|
|
965
973
|
*/
|
|
966
|
-
static buildCreateDidTransaction(client, from, did, did_doc) {
|
|
974
|
+
static buildCreateDidTransaction(client, from, did, did_doc, nonce) {
|
|
967
975
|
_assertClass(client, LedgerClient);
|
|
968
976
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
969
977
|
const len0 = WASM_VECTOR_LEN;
|
|
970
978
|
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
971
979
|
const len1 = WASM_VECTOR_LEN;
|
|
972
|
-
const ret = wasm.indydidregistry_buildCreateDidTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, did_doc);
|
|
980
|
+
const ret = wasm.indydidregistry_buildCreateDidTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, did_doc, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
973
981
|
return ret;
|
|
974
982
|
}
|
|
975
983
|
/**
|
|
@@ -977,15 +985,16 @@ class IndyDidRegistry {
|
|
|
977
985
|
* @param {string} from
|
|
978
986
|
* @param {string} did
|
|
979
987
|
* @param {DidDocument} did_doc
|
|
988
|
+
* @param {bigint | null} [nonce]
|
|
980
989
|
* @returns {Promise<Transaction>}
|
|
981
990
|
*/
|
|
982
|
-
static buildUpdateDidTransaction(client, from, did, did_doc) {
|
|
991
|
+
static buildUpdateDidTransaction(client, from, did, did_doc, nonce) {
|
|
983
992
|
_assertClass(client, LedgerClient);
|
|
984
993
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
985
994
|
const len0 = WASM_VECTOR_LEN;
|
|
986
995
|
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
987
996
|
const len1 = WASM_VECTOR_LEN;
|
|
988
|
-
const ret = wasm.indydidregistry_buildUpdateDidTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, did_doc);
|
|
997
|
+
const ret = wasm.indydidregistry_buildUpdateDidTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, did_doc, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
989
998
|
return ret;
|
|
990
999
|
}
|
|
991
1000
|
/**
|
|
@@ -1030,15 +1039,16 @@ class IndyDidRegistry {
|
|
|
1030
1039
|
* @param {LedgerClient} client
|
|
1031
1040
|
* @param {string} from
|
|
1032
1041
|
* @param {string} did
|
|
1042
|
+
* @param {bigint | null} [nonce]
|
|
1033
1043
|
* @returns {Promise<Transaction>}
|
|
1034
1044
|
*/
|
|
1035
|
-
static buildDeactivateDidTransaction(client, from, did) {
|
|
1045
|
+
static buildDeactivateDidTransaction(client, from, did, nonce) {
|
|
1036
1046
|
_assertClass(client, LedgerClient);
|
|
1037
1047
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1038
1048
|
const len0 = WASM_VECTOR_LEN;
|
|
1039
1049
|
const ptr1 = passStringToWasm0(did, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1040
1050
|
const len1 = WASM_VECTOR_LEN;
|
|
1041
|
-
const ret = wasm.indydidregistry_buildDeactivateDidTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1051
|
+
const ret = wasm.indydidregistry_buildDeactivateDidTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
1042
1052
|
return ret;
|
|
1043
1053
|
}
|
|
1044
1054
|
/**
|
|
@@ -1096,6 +1106,16 @@ class LedgerClient {
|
|
|
1096
1106
|
const ret = wasm.ledgerclient_submitTransaction(this.__wbg_ptr, transaction.__wbg_ptr);
|
|
1097
1107
|
return ret;
|
|
1098
1108
|
}
|
|
1109
|
+
/**
|
|
1110
|
+
* @param {string} address
|
|
1111
|
+
* @returns {Promise<bigint>}
|
|
1112
|
+
*/
|
|
1113
|
+
getTransactionCount(address) {
|
|
1114
|
+
const ptr0 = passStringToWasm0(address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1115
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1116
|
+
const ret = wasm.ledgerclient_getTransactionCount(this.__wbg_ptr, ptr0, len0);
|
|
1117
|
+
return ret;
|
|
1118
|
+
}
|
|
1099
1119
|
/**
|
|
1100
1120
|
* @param {number} chain_id
|
|
1101
1121
|
* @param {string} node_address
|
|
@@ -1209,9 +1229,10 @@ class LegacyMappingRegistry {
|
|
|
1209
1229
|
* @param {string} legacy_did
|
|
1210
1230
|
* @param {string} legacy_verkey
|
|
1211
1231
|
* @param {Uint8Array} ed25519_signature
|
|
1232
|
+
* @param {bigint | null} [nonce]
|
|
1212
1233
|
* @returns {Promise<Transaction>}
|
|
1213
1234
|
*/
|
|
1214
|
-
static buildCreateDidMappingTransaction(client, from, did, legacy_did, legacy_verkey, ed25519_signature) {
|
|
1235
|
+
static buildCreateDidMappingTransaction(client, from, did, legacy_did, legacy_verkey, ed25519_signature, nonce) {
|
|
1215
1236
|
_assertClass(client, LedgerClient);
|
|
1216
1237
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1217
1238
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -1223,7 +1244,7 @@ class LegacyMappingRegistry {
|
|
|
1223
1244
|
const len3 = WASM_VECTOR_LEN;
|
|
1224
1245
|
const ptr4 = passArray8ToWasm0(ed25519_signature, wasm.__wbindgen_malloc);
|
|
1225
1246
|
const len4 = WASM_VECTOR_LEN;
|
|
1226
|
-
const ret = wasm.legacymappingregistry_buildCreateDidMappingTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
1247
|
+
const ret = wasm.legacymappingregistry_buildCreateDidMappingTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
1227
1248
|
return ret;
|
|
1228
1249
|
}
|
|
1229
1250
|
/**
|
|
@@ -1266,9 +1287,10 @@ class LegacyMappingRegistry {
|
|
|
1266
1287
|
* @param {string} legacy_issuer_identifier
|
|
1267
1288
|
* @param {string} legacy_identifier
|
|
1268
1289
|
* @param {string} new_identifier
|
|
1290
|
+
* @param {bigint | null} [nonce]
|
|
1269
1291
|
* @returns {Promise<Transaction>}
|
|
1270
1292
|
*/
|
|
1271
|
-
static buildCreateResourceMappingTransaction(client, from, did, legacy_issuer_identifier, legacy_identifier, new_identifier) {
|
|
1293
|
+
static buildCreateResourceMappingTransaction(client, from, did, legacy_issuer_identifier, legacy_identifier, new_identifier, nonce) {
|
|
1272
1294
|
_assertClass(client, LedgerClient);
|
|
1273
1295
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1274
1296
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -1280,7 +1302,7 @@ class LegacyMappingRegistry {
|
|
|
1280
1302
|
const len3 = WASM_VECTOR_LEN;
|
|
1281
1303
|
const ptr4 = passStringToWasm0(new_identifier, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1282
1304
|
const len4 = WASM_VECTOR_LEN;
|
|
1283
|
-
const ret = wasm.legacymappingregistry_buildCreateResourceMappingTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
1305
|
+
const ret = wasm.legacymappingregistry_buildCreateResourceMappingTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
1284
1306
|
return ret;
|
|
1285
1307
|
}
|
|
1286
1308
|
/**
|
|
@@ -1348,14 +1370,15 @@ class RevocationRegistry {
|
|
|
1348
1370
|
* @param {LedgerClient} client
|
|
1349
1371
|
* @param {string} from
|
|
1350
1372
|
* @param {RevocationRegistryEntry} rev_reg_entry
|
|
1373
|
+
* @param {bigint | null} [nonce]
|
|
1351
1374
|
* @returns {Promise<Transaction>}
|
|
1352
1375
|
*/
|
|
1353
|
-
static buildCreateRevocationRegistryEntryTransaction(client, from, rev_reg_entry) {
|
|
1376
|
+
static buildCreateRevocationRegistryEntryTransaction(client, from, rev_reg_entry, nonce) {
|
|
1354
1377
|
_assertClass(client, LedgerClient);
|
|
1355
1378
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1356
1379
|
const len0 = WASM_VECTOR_LEN;
|
|
1357
1380
|
_assertClass(rev_reg_entry, RevocationRegistryEntry);
|
|
1358
|
-
const ret = wasm.revocationregistry_buildCreateRevocationRegistryEntryTransaction(client.__wbg_ptr, ptr0, len0, rev_reg_entry.__wbg_ptr);
|
|
1381
|
+
const ret = wasm.revocationregistry_buildCreateRevocationRegistryEntryTransaction(client.__wbg_ptr, ptr0, len0, rev_reg_entry.__wbg_ptr, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
1359
1382
|
return ret;
|
|
1360
1383
|
}
|
|
1361
1384
|
/**
|
|
@@ -1388,14 +1411,15 @@ class RevocationRegistry {
|
|
|
1388
1411
|
* @param {LedgerClient} client
|
|
1389
1412
|
* @param {string} from
|
|
1390
1413
|
* @param {RevocationRegistryDefinition} rev_reg_def
|
|
1414
|
+
* @param {bigint | null} [nonce]
|
|
1391
1415
|
* @returns {Promise<Transaction>}
|
|
1392
1416
|
*/
|
|
1393
|
-
static buildCreateRevocationRegistryDefinitionTransaction(client, from, rev_reg_def) {
|
|
1417
|
+
static buildCreateRevocationRegistryDefinitionTransaction(client, from, rev_reg_def, nonce) {
|
|
1394
1418
|
_assertClass(client, LedgerClient);
|
|
1395
1419
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1396
1420
|
const len0 = WASM_VECTOR_LEN;
|
|
1397
1421
|
_assertClass(rev_reg_def, RevocationRegistryDefinition);
|
|
1398
|
-
const ret = wasm.revocationregistry_buildCreateRevocationRegistryDefinitionTransaction(client.__wbg_ptr, ptr0, len0, rev_reg_def.__wbg_ptr);
|
|
1422
|
+
const ret = wasm.revocationregistry_buildCreateRevocationRegistryDefinitionTransaction(client.__wbg_ptr, ptr0, len0, rev_reg_def.__wbg_ptr, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
1399
1423
|
return ret;
|
|
1400
1424
|
}
|
|
1401
1425
|
/**
|
|
@@ -1745,15 +1769,16 @@ class RoleControl {
|
|
|
1745
1769
|
* @param {string} from
|
|
1746
1770
|
* @param {number} role
|
|
1747
1771
|
* @param {string} account
|
|
1772
|
+
* @param {bigint | null} [nonce]
|
|
1748
1773
|
* @returns {Promise<Transaction>}
|
|
1749
1774
|
*/
|
|
1750
|
-
static buildAssignRoleTransaction(client, from, role, account) {
|
|
1775
|
+
static buildAssignRoleTransaction(client, from, role, account, nonce) {
|
|
1751
1776
|
_assertClass(client, LedgerClient);
|
|
1752
1777
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1753
1778
|
const len0 = WASM_VECTOR_LEN;
|
|
1754
1779
|
const ptr1 = passStringToWasm0(account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1755
1780
|
const len1 = WASM_VECTOR_LEN;
|
|
1756
|
-
const ret = wasm.rolecontrol_buildAssignRoleTransaction(client.__wbg_ptr, ptr0, len0, role, ptr1, len1);
|
|
1781
|
+
const ret = wasm.rolecontrol_buildAssignRoleTransaction(client.__wbg_ptr, ptr0, len0, role, ptr1, len1, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
1757
1782
|
return ret;
|
|
1758
1783
|
}
|
|
1759
1784
|
/**
|
|
@@ -1761,15 +1786,16 @@ class RoleControl {
|
|
|
1761
1786
|
* @param {string} from
|
|
1762
1787
|
* @param {number} role
|
|
1763
1788
|
* @param {string} account
|
|
1789
|
+
* @param {bigint | null} [nonce]
|
|
1764
1790
|
* @returns {Promise<Transaction>}
|
|
1765
1791
|
*/
|
|
1766
|
-
static buildRevokeRoleTransaction(client, from, role, account) {
|
|
1792
|
+
static buildRevokeRoleTransaction(client, from, role, account, nonce) {
|
|
1767
1793
|
_assertClass(client, LedgerClient);
|
|
1768
1794
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1769
1795
|
const len0 = WASM_VECTOR_LEN;
|
|
1770
1796
|
const ptr1 = passStringToWasm0(account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1771
1797
|
const len1 = WASM_VECTOR_LEN;
|
|
1772
|
-
const ret = wasm.rolecontrol_buildRevokeRoleTransaction(client.__wbg_ptr, ptr0, len0, role, ptr1, len1);
|
|
1798
|
+
const ret = wasm.rolecontrol_buildRevokeRoleTransaction(client.__wbg_ptr, ptr0, len0, role, ptr1, len1, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
1773
1799
|
return ret;
|
|
1774
1800
|
}
|
|
1775
1801
|
}
|
|
@@ -1919,14 +1945,15 @@ class SchemaRegistry {
|
|
|
1919
1945
|
* @param {LedgerClient} client
|
|
1920
1946
|
* @param {string} from
|
|
1921
1947
|
* @param {Schema} schema
|
|
1948
|
+
* @param {bigint | null} [nonce]
|
|
1922
1949
|
* @returns {Promise<Transaction>}
|
|
1923
1950
|
*/
|
|
1924
|
-
static buildCreateSchemaTransaction(client, from, schema) {
|
|
1951
|
+
static buildCreateSchemaTransaction(client, from, schema, nonce) {
|
|
1925
1952
|
_assertClass(client, LedgerClient);
|
|
1926
1953
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1927
1954
|
const len0 = WASM_VECTOR_LEN;
|
|
1928
1955
|
_assertClass(schema, Schema);
|
|
1929
|
-
const ret = wasm.schemaregistry_buildCreateSchemaTransaction(client.__wbg_ptr, ptr0, len0, schema.__wbg_ptr);
|
|
1956
|
+
const ret = wasm.schemaregistry_buildCreateSchemaTransaction(client.__wbg_ptr, ptr0, len0, schema.__wbg_ptr, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
1930
1957
|
return ret;
|
|
1931
1958
|
}
|
|
1932
1959
|
/**
|
|
@@ -2093,15 +2120,16 @@ class ValidatorControl {
|
|
|
2093
2120
|
* @param {LedgerClient} client
|
|
2094
2121
|
* @param {string} from
|
|
2095
2122
|
* @param {string} validator_address
|
|
2123
|
+
* @param {bigint | null} [nonce]
|
|
2096
2124
|
* @returns {Promise<Transaction>}
|
|
2097
2125
|
*/
|
|
2098
|
-
static buildAddValidatorTransaction(client, from, validator_address) {
|
|
2126
|
+
static buildAddValidatorTransaction(client, from, validator_address, nonce) {
|
|
2099
2127
|
_assertClass(client, LedgerClient);
|
|
2100
2128
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2101
2129
|
const len0 = WASM_VECTOR_LEN;
|
|
2102
2130
|
const ptr1 = passStringToWasm0(validator_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2103
2131
|
const len1 = WASM_VECTOR_LEN;
|
|
2104
|
-
const ret = wasm.validatorcontrol_buildAddValidatorTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
2132
|
+
const ret = wasm.validatorcontrol_buildAddValidatorTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
2105
2133
|
return ret;
|
|
2106
2134
|
}
|
|
2107
2135
|
/**
|
|
@@ -2117,15 +2145,16 @@ class ValidatorControl {
|
|
|
2117
2145
|
* @param {LedgerClient} client
|
|
2118
2146
|
* @param {string} from
|
|
2119
2147
|
* @param {string} validator_address
|
|
2148
|
+
* @param {bigint | null} [nonce]
|
|
2120
2149
|
* @returns {Promise<Transaction>}
|
|
2121
2150
|
*/
|
|
2122
|
-
static buildRemoveValidatorTransaction(client, from, validator_address) {
|
|
2151
|
+
static buildRemoveValidatorTransaction(client, from, validator_address, nonce) {
|
|
2123
2152
|
_assertClass(client, LedgerClient);
|
|
2124
2153
|
const ptr0 = passStringToWasm0(from, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2125
2154
|
const len0 = WASM_VECTOR_LEN;
|
|
2126
2155
|
const ptr1 = passStringToWasm0(validator_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2127
2156
|
const len1 = WASM_VECTOR_LEN;
|
|
2128
|
-
const ret = wasm.validatorcontrol_buildRemoveValidatorTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
2157
|
+
const ret = wasm.validatorcontrol_buildRemoveValidatorTransaction(client.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
2129
2158
|
return ret;
|
|
2130
2159
|
}
|
|
2131
2160
|
}
|
|
Binary file
|