Skip to content

Commit

Permalink
update for CSL 12.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lisicky committed Aug 28, 2024
1 parent c9d6a15 commit d484ec4
Show file tree
Hide file tree
Showing 10 changed files with 179 additions and 178 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2318,9 +2318,9 @@ public final void csl_bridge_committeeColdResignFromJson(String json, Promise pr
}

@ReactMethod
public final void csl_bridge_committeeColdResignCommitteeColdKey(String self, Promise promise) {
public final void csl_bridge_committeeColdResignCommitteeColdCredential(String self, Promise promise) {
Native.I
.csl_bridge_committeeColdResignCommitteeColdKey(new RPtr(self))
.csl_bridge_committeeColdResignCommitteeColdCredential(new RPtr(self))
.map(RPtr::toJs)
.pour(promise);
}
Expand All @@ -2334,17 +2334,17 @@ public final void csl_bridge_committeeColdResignAnchor(String self, Promise prom
}

@ReactMethod
public final void csl_bridge_committeeColdResignNew(String committeeColdKey, Promise promise) {
public final void csl_bridge_committeeColdResignNew(String committeeColdCredential, Promise promise) {
Native.I
.csl_bridge_committeeColdResignNew(new RPtr(committeeColdKey))
.csl_bridge_committeeColdResignNew(new RPtr(committeeColdCredential))
.map(RPtr::toJs)
.pour(promise);
}

@ReactMethod
public final void csl_bridge_committeeColdResignNewWithAnchor(String committeeColdKey, String anchor, Promise promise) {
public final void csl_bridge_committeeColdResignNewWithAnchor(String committeeColdCredential, String anchor, Promise promise) {
Native.I
.csl_bridge_committeeColdResignNewWithAnchor(new RPtr(committeeColdKey), new RPtr(anchor))
.csl_bridge_committeeColdResignNewWithAnchor(new RPtr(committeeColdCredential), new RPtr(anchor))
.map(RPtr::toJs)
.pour(promise);
}
Expand Down Expand Up @@ -2404,25 +2404,25 @@ public final void csl_bridge_committeeHotAuthFromJson(String json, Promise promi
}

@ReactMethod
public final void csl_bridge_committeeHotAuthCommitteeColdKey(String self, Promise promise) {
public final void csl_bridge_committeeHotAuthCommitteeColdCredential(String self, Promise promise) {
Native.I
.csl_bridge_committeeHotAuthCommitteeColdKey(new RPtr(self))
.csl_bridge_committeeHotAuthCommitteeColdCredential(new RPtr(self))
.map(RPtr::toJs)
.pour(promise);
}

@ReactMethod
public final void csl_bridge_committeeHotAuthCommitteeHotKey(String self, Promise promise) {
public final void csl_bridge_committeeHotAuthCommitteeHotCredential(String self, Promise promise) {
Native.I
.csl_bridge_committeeHotAuthCommitteeHotKey(new RPtr(self))
.csl_bridge_committeeHotAuthCommitteeHotCredential(new RPtr(self))
.map(RPtr::toJs)
.pour(promise);
}

@ReactMethod
public final void csl_bridge_committeeHotAuthNew(String committeeColdKey, String committeeHotKey, Promise promise) {
public final void csl_bridge_committeeHotAuthNew(String committeeColdCredential, String committeeHotCredential, Promise promise) {
Native.I
.csl_bridge_committeeHotAuthNew(new RPtr(committeeColdKey), new RPtr(committeeHotKey))
.csl_bridge_committeeHotAuthNew(new RPtr(committeeColdCredential), new RPtr(committeeHotCredential))
.map(RPtr::toJs)
.pour(promise);
}
Expand Down Expand Up @@ -15528,25 +15528,25 @@ public final void csl_bridge_voterFromJson(String json, Promise promise) {
}

@ReactMethod
public final void csl_bridge_voterNewConstitutionalCommitteeHotKey(String cred, Promise promise) {
public final void csl_bridge_voterNewConstitutionalCommitteeHotCredential(String cred, Promise promise) {
Native.I
.csl_bridge_voterNewConstitutionalCommitteeHotKey(new RPtr(cred))
.csl_bridge_voterNewConstitutionalCommitteeHotCredential(new RPtr(cred))
.map(RPtr::toJs)
.pour(promise);
}

@ReactMethod
public final void csl_bridge_voterNewDrep(String cred, Promise promise) {
public final void csl_bridge_voterNewDrepCredential(String cred, Promise promise) {
Native.I
.csl_bridge_voterNewDrep(new RPtr(cred))
.csl_bridge_voterNewDrepCredential(new RPtr(cred))
.map(RPtr::toJs)
.pour(promise);
}

@ReactMethod
public final void csl_bridge_voterNewStakingPool(String keyHash, Promise promise) {
public final void csl_bridge_voterNewStakePoolKeyHash(String keyHash, Promise promise) {
Native.I
.csl_bridge_voterNewStakingPool(new RPtr(keyHash))
.csl_bridge_voterNewStakePoolKeyHash(new RPtr(keyHash))
.map(RPtr::toJs)
.pour(promise);
}
Expand All @@ -15559,25 +15559,25 @@ public final void csl_bridge_voterKind(String self, Promise promise) {
}

@ReactMethod
public final void csl_bridge_voterToConstitutionalCommitteeHotKey(String self, Promise promise) {
public final void csl_bridge_voterToConstitutionalCommitteeHotCredential(String self, Promise promise) {
Native.I
.csl_bridge_voterToConstitutionalCommitteeHotKey(new RPtr(self))
.csl_bridge_voterToConstitutionalCommitteeHotCredential(new RPtr(self))
.map(RPtr::toJs)
.pour(promise);
}

@ReactMethod
public final void csl_bridge_voterToDrepCred(String self, Promise promise) {
public final void csl_bridge_voterToDrepCredential(String self, Promise promise) {
Native.I
.csl_bridge_voterToDrepCred(new RPtr(self))
.csl_bridge_voterToDrepCredential(new RPtr(self))
.map(RPtr::toJs)
.pour(promise);
}

@ReactMethod
public final void csl_bridge_voterToStakingPoolKeyHash(String self, Promise promise) {
public final void csl_bridge_voterToStakePoolKeyHash(String self, Promise promise) {
Native.I
.csl_bridge_voterToStakingPoolKeyHash(new RPtr(self))
.csl_bridge_voterToStakePoolKeyHash(new RPtr(self))
.map(RPtr::toJs)
.pour(promise);
}
Expand Down
24 changes: 12 additions & 12 deletions android/src/main/java/io/emurgo/rnhaskellshelley/Native.java
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,10 @@ private Native() { }
public final native Result<RPtr> csl_bridge_committeeColdResignFromHex(String hexStr);
public final native Result<String> csl_bridge_committeeColdResignToJson(RPtr self);
public final native Result<RPtr> csl_bridge_committeeColdResignFromJson(String json);
public final native Result<RPtr> csl_bridge_committeeColdResignCommitteeColdKey(RPtr self);
public final native Result<RPtr> csl_bridge_committeeColdResignCommitteeColdCredential(RPtr self);
public final native Result<RPtr> csl_bridge_committeeColdResignAnchor(RPtr self);
public final native Result<RPtr> csl_bridge_committeeColdResignNew(RPtr committeeColdKey);
public final native Result<RPtr> csl_bridge_committeeColdResignNewWithAnchor(RPtr committeeColdKey, RPtr anchor);
public final native Result<RPtr> csl_bridge_committeeColdResignNew(RPtr committeeColdCredential);
public final native Result<RPtr> csl_bridge_committeeColdResignNewWithAnchor(RPtr committeeColdCredential, RPtr anchor);
public final native Result<Boolean> csl_bridge_committeeColdResignHasScriptCredentials(RPtr self);

public final native Result<byte[]> csl_bridge_committeeHotAuthToBytes(RPtr self);
Expand All @@ -343,9 +343,9 @@ private Native() { }
public final native Result<RPtr> csl_bridge_committeeHotAuthFromHex(String hexStr);
public final native Result<String> csl_bridge_committeeHotAuthToJson(RPtr self);
public final native Result<RPtr> csl_bridge_committeeHotAuthFromJson(String json);
public final native Result<RPtr> csl_bridge_committeeHotAuthCommitteeColdKey(RPtr self);
public final native Result<RPtr> csl_bridge_committeeHotAuthCommitteeHotKey(RPtr self);
public final native Result<RPtr> csl_bridge_committeeHotAuthNew(RPtr committeeColdKey, RPtr committeeHotKey);
public final native Result<RPtr> csl_bridge_committeeHotAuthCommitteeColdCredential(RPtr self);
public final native Result<RPtr> csl_bridge_committeeHotAuthCommitteeHotCredential(RPtr self);
public final native Result<RPtr> csl_bridge_committeeHotAuthNew(RPtr committeeColdCredential, RPtr committeeHotCredential);
public final native Result<Boolean> csl_bridge_committeeHotAuthHasScriptCredentials(RPtr self);

public final native Result<byte[]> csl_bridge_constitutionToBytes(RPtr self);
Expand Down Expand Up @@ -2189,13 +2189,13 @@ private Native() { }
public final native Result<RPtr> csl_bridge_voterFromHex(String hexStr);
public final native Result<String> csl_bridge_voterToJson(RPtr self);
public final native Result<RPtr> csl_bridge_voterFromJson(String json);
public final native Result<RPtr> csl_bridge_voterNewConstitutionalCommitteeHotKey(RPtr cred);
public final native Result<RPtr> csl_bridge_voterNewDrep(RPtr cred);
public final native Result<RPtr> csl_bridge_voterNewStakingPool(RPtr keyHash);
public final native Result<RPtr> csl_bridge_voterNewConstitutionalCommitteeHotCredential(RPtr cred);
public final native Result<RPtr> csl_bridge_voterNewDrepCredential(RPtr cred);
public final native Result<RPtr> csl_bridge_voterNewStakePoolKeyHash(RPtr keyHash);
public final native Result<Integer> csl_bridge_voterKind(RPtr self);
public final native Result<RPtr> csl_bridge_voterToConstitutionalCommitteeHotKey(RPtr self);
public final native Result<RPtr> csl_bridge_voterToDrepCred(RPtr self);
public final native Result<RPtr> csl_bridge_voterToStakingPoolKeyHash(RPtr self);
public final native Result<RPtr> csl_bridge_voterToConstitutionalCommitteeHotCredential(RPtr self);
public final native Result<RPtr> csl_bridge_voterToDrepCredential(RPtr self);
public final native Result<RPtr> csl_bridge_voterToStakePoolKeyHash(RPtr self);
public final native Result<Boolean> csl_bridge_voterHasScriptCredentials(RPtr self);
public final native Result<RPtr> csl_bridge_voterToKeyHash(RPtr self);

Expand Down
32 changes: 16 additions & 16 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1713,25 +1713,25 @@ export class CommitteeColdResign extends Ptr {
/**
* @returns {Promise<Credential>}
*/
committee_cold_key: () => Promise<Credential>;
committee_cold_credential: () => Promise<Credential>;

/**
* @returns {Promise<Optional<Anchor>>}
*/
anchor: () => Promise<Optional<Anchor>>;

/**
* @param {Credential} committee_cold_key
* @param {Credential} committee_cold_credential
* @returns {Promise<CommitteeColdResign>}
*/
static new: (committee_cold_key: Credential) => Promise<CommitteeColdResign>;
static new: (committee_cold_credential: Credential) => Promise<CommitteeColdResign>;

/**
* @param {Credential} committee_cold_key
* @param {Credential} committee_cold_credential
* @param {Anchor} anchor
* @returns {Promise<CommitteeColdResign>}
*/
static new_with_anchor: (committee_cold_key: Credential, anchor: Anchor) => Promise<CommitteeColdResign>;
static new_with_anchor: (committee_cold_credential: Credential, anchor: Anchor) => Promise<CommitteeColdResign>;

/**
* @returns {Promise<boolean>}
Expand Down Expand Up @@ -1778,19 +1778,19 @@ export class CommitteeHotAuth extends Ptr {
/**
* @returns {Promise<Credential>}
*/
committee_cold_key: () => Promise<Credential>;
committee_cold_credential: () => Promise<Credential>;

/**
* @returns {Promise<Credential>}
*/
committee_hot_key: () => Promise<Credential>;
committee_hot_credential: () => Promise<Credential>;

/**
* @param {Credential} committee_cold_key
* @param {Credential} committee_hot_key
* @param {Credential} committee_cold_credential
* @param {Credential} committee_hot_credential
* @returns {Promise<CommitteeHotAuth>}
*/
static new: (committee_cold_key: Credential, committee_hot_key: Credential) => Promise<CommitteeHotAuth>;
static new: (committee_cold_credential: Credential, committee_hot_credential: Credential) => Promise<CommitteeHotAuth>;

/**
* @returns {Promise<boolean>}
Expand Down Expand Up @@ -11604,19 +11604,19 @@ export class Voter extends Ptr {
* @param {Credential} cred
* @returns {Promise<Voter>}
*/
static new_constitutional_committee_hot_key: (cred: Credential) => Promise<Voter>;
static new_constitutional_committee_hot_credential: (cred: Credential) => Promise<Voter>;

/**
* @param {Credential} cred
* @returns {Promise<Voter>}
*/
static new_drep: (cred: Credential) => Promise<Voter>;
static new_drep_credential: (cred: Credential) => Promise<Voter>;

/**
* @param {Ed25519KeyHash} key_hash
* @returns {Promise<Voter>}
*/
static new_staking_pool: (key_hash: Ed25519KeyHash) => Promise<Voter>;
static new_stake_pool_key_hash: (key_hash: Ed25519KeyHash) => Promise<Voter>;

/**
* @returns {Promise<VoterKind>}
Expand All @@ -11626,17 +11626,17 @@ export class Voter extends Ptr {
/**
* @returns {Promise<Optional<Credential>>}
*/
to_constitutional_committee_hot_key: () => Promise<Optional<Credential>>;
to_constitutional_committee_hot_credential: () => Promise<Optional<Credential>>;

/**
* @returns {Promise<Optional<Credential>>}
*/
to_drep_cred: () => Promise<Optional<Credential>>;
to_drep_credential: () => Promise<Optional<Credential>>;

/**
* @returns {Promise<Optional<Ed25519KeyHash>>}
*/
to_staking_pool_key_hash: () => Promise<Optional<Ed25519KeyHash>>;
to_stake_pool_key_hash: () => Promise<Optional<Ed25519KeyHash>>;

/**
* @returns {Promise<boolean>}
Expand Down
56 changes: 28 additions & 28 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1715,8 +1715,8 @@ export class CommitteeColdResign extends Ptr {
return Ptr._wrap(ret, CommitteeColdResign);
}

async committee_cold_key() {
const ret = await HaskellShelley.csl_bridge_committeeColdResignCommitteeColdKey(this.ptr);
async committee_cold_credential() {
const ret = await HaskellShelley.csl_bridge_committeeColdResignCommitteeColdCredential(this.ptr);
return Ptr._wrap(ret, Credential);
}

Expand All @@ -1725,16 +1725,16 @@ export class CommitteeColdResign extends Ptr {
return Ptr._wrap(ret, Anchor);
}

static async new(committee_cold_key) {
const committee_cold_keyPtr = Ptr._assertClass(committee_cold_key, Credential);
const ret = await HaskellShelley.csl_bridge_committeeColdResignNew(committee_cold_keyPtr);
static async new(committee_cold_credential) {
const committee_cold_credentialPtr = Ptr._assertClass(committee_cold_credential, Credential);
const ret = await HaskellShelley.csl_bridge_committeeColdResignNew(committee_cold_credentialPtr);
return Ptr._wrap(ret, CommitteeColdResign);
}

static async new_with_anchor(committee_cold_key, anchor) {
const committee_cold_keyPtr = Ptr._assertClass(committee_cold_key, Credential);
static async new_with_anchor(committee_cold_credential, anchor) {
const committee_cold_credentialPtr = Ptr._assertClass(committee_cold_credential, Credential);
const anchorPtr = Ptr._assertClass(anchor, Anchor);
const ret = await HaskellShelley.csl_bridge_committeeColdResignNewWithAnchor(committee_cold_keyPtr, anchorPtr);
const ret = await HaskellShelley.csl_bridge_committeeColdResignNewWithAnchor(committee_cold_credentialPtr, anchorPtr);
return Ptr._wrap(ret, CommitteeColdResign);
}

Expand Down Expand Up @@ -1777,20 +1777,20 @@ export class CommitteeHotAuth extends Ptr {
return Ptr._wrap(ret, CommitteeHotAuth);
}

async committee_cold_key() {
const ret = await HaskellShelley.csl_bridge_committeeHotAuthCommitteeColdKey(this.ptr);
async committee_cold_credential() {
const ret = await HaskellShelley.csl_bridge_committeeHotAuthCommitteeColdCredential(this.ptr);
return Ptr._wrap(ret, Credential);
}

async committee_hot_key() {
const ret = await HaskellShelley.csl_bridge_committeeHotAuthCommitteeHotKey(this.ptr);
async committee_hot_credential() {
const ret = await HaskellShelley.csl_bridge_committeeHotAuthCommitteeHotCredential(this.ptr);
return Ptr._wrap(ret, Credential);
}

static async new(committee_cold_key, committee_hot_key) {
const committee_cold_keyPtr = Ptr._assertClass(committee_cold_key, Credential);
const committee_hot_keyPtr = Ptr._assertClass(committee_hot_key, Credential);
const ret = await HaskellShelley.csl_bridge_committeeHotAuthNew(committee_cold_keyPtr, committee_hot_keyPtr);
static async new(committee_cold_credential, committee_hot_credential) {
const committee_cold_credentialPtr = Ptr._assertClass(committee_cold_credential, Credential);
const committee_hot_credentialPtr = Ptr._assertClass(committee_hot_credential, Credential);
const ret = await HaskellShelley.csl_bridge_committeeHotAuthNew(committee_cold_credentialPtr, committee_hot_credentialPtr);
return Ptr._wrap(ret, CommitteeHotAuth);
}

Expand Down Expand Up @@ -11301,21 +11301,21 @@ export class Voter extends Ptr {
return Ptr._wrap(ret, Voter);
}

static async new_constitutional_committee_hot_key(cred) {
static async new_constitutional_committee_hot_credential(cred) {
const credPtr = Ptr._assertClass(cred, Credential);
const ret = await HaskellShelley.csl_bridge_voterNewConstitutionalCommitteeHotKey(credPtr);
const ret = await HaskellShelley.csl_bridge_voterNewConstitutionalCommitteeHotCredential(credPtr);
return Ptr._wrap(ret, Voter);
}

static async new_drep(cred) {
static async new_drep_credential(cred) {
const credPtr = Ptr._assertClass(cred, Credential);
const ret = await HaskellShelley.csl_bridge_voterNewDrep(credPtr);
const ret = await HaskellShelley.csl_bridge_voterNewDrepCredential(credPtr);
return Ptr._wrap(ret, Voter);
}

static async new_staking_pool(key_hash) {
static async new_stake_pool_key_hash(key_hash) {
const key_hashPtr = Ptr._assertClass(key_hash, Ed25519KeyHash);
const ret = await HaskellShelley.csl_bridge_voterNewStakingPool(key_hashPtr);
const ret = await HaskellShelley.csl_bridge_voterNewStakePoolKeyHash(key_hashPtr);
return Ptr._wrap(ret, Voter);
}

Expand All @@ -11324,18 +11324,18 @@ export class Voter extends Ptr {
return ret;
}

async to_constitutional_committee_hot_key() {
const ret = await HaskellShelley.csl_bridge_voterToConstitutionalCommitteeHotKey(this.ptr);
async to_constitutional_committee_hot_credential() {
const ret = await HaskellShelley.csl_bridge_voterToConstitutionalCommitteeHotCredential(this.ptr);
return Ptr._wrap(ret, Credential);
}

async to_drep_cred() {
const ret = await HaskellShelley.csl_bridge_voterToDrepCred(this.ptr);
async to_drep_credential() {
const ret = await HaskellShelley.csl_bridge_voterToDrepCredential(this.ptr);
return Ptr._wrap(ret, Credential);
}

async to_staking_pool_key_hash() {
const ret = await HaskellShelley.csl_bridge_voterToStakingPoolKeyHash(this.ptr);
async to_stake_pool_key_hash() {
const ret = await HaskellShelley.csl_bridge_voterToStakePoolKeyHash(this.ptr);
return Ptr._wrap(ret, Ed25519KeyHash);
}

Expand Down
Loading

0 comments on commit d484ec4

Please sign in to comment.