Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/change transactionbuilder creation #261

Merged
merged 12 commits into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

111 changes: 79 additions & 32 deletions rust/pkg/cardano_serialization_lib.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,14 @@ declare export var NetworkIdKind: {|
+Mainnet: 1, // 1
|};

/**
*/

declare export var StakeCredKind: {|
+Key: 0, // 0
+Script: 1, // 1
|};

/**
*/

Expand Down Expand Up @@ -293,14 +301,6 @@ declare export var RedeemerTagKind: {|
+Reward: 3, // 3
|};

/**
*/

declare export var CoinSelectionStrategyCIP2: {|
+LargestFirst: 0, // 0
+RandomImprove: 1, // 1
|};

/**
* Used to choosed the schema for a script JSON string
*/
Expand Down Expand Up @@ -333,9 +333,9 @@ declare export var MetadataJsonSchema: {|
/**
*/

declare export var StakeCredKind: {|
+Key: 0, // 0
+Script: 1, // 1
declare export var CoinSelectionStrategyCIP2: {|
+LargestFirst: 0, // 0
+RandomImprove: 1, // 1
|};

/**
Expand Down Expand Up @@ -5244,29 +5244,10 @@ declare export class TransactionBuilder {
): void;

/**
* If set to true, add_change_if_needed will try
* to put pure Coin in a separate output from assets
* @param {boolean} prefer_pure_change
*/
set_prefer_pure_change(prefer_pure_change: boolean): void;

/**
* @param {LinearFee} linear_fee
* @param {BigNum} pool_deposit
* @param {BigNum} key_deposit
* @param {number} max_value_size
* @param {number} max_tx_size
* @param {BigNum} coins_per_utxo_word
* @param {TransactionBuilderConfig} cfg
* @returns {TransactionBuilder}
*/
static new(
linear_fee: LinearFee,
pool_deposit: BigNum,
key_deposit: BigNum,
max_value_size: number,
max_tx_size: number,
coins_per_utxo_word: BigNum
): TransactionBuilder;
static new(cfg: TransactionBuilderConfig): TransactionBuilder;

/**
* does not include refunds or withdrawals
Expand Down Expand Up @@ -5340,6 +5321,72 @@ declare export class TransactionBuilder {
*/
min_fee(): BigNum;
}
/**
*/
declare export class TransactionBuilderConfig {
free(): void;
}
ozgrakkurt marked this conversation as resolved.
Show resolved Hide resolved
/**
*/
declare export class TransactionBuilderConfigBuilder {
free(): void;

/**
* @returns {TransactionBuilderConfigBuilder}
*/
static new(): TransactionBuilderConfigBuilder;

/**
* @param {LinearFee} fee_algo
* @returns {TransactionBuilderConfigBuilder}
*/
fee_algo(fee_algo: LinearFee): TransactionBuilderConfigBuilder;

/**
* @param {BigNum} pool_deposit
* @returns {TransactionBuilderConfigBuilder}
*/
pool_deposit(pool_deposit: BigNum): TransactionBuilderConfigBuilder;

/**
* @param {BigNum} key_deposit
* @returns {TransactionBuilderConfigBuilder}
*/
key_deposit(key_deposit: BigNum): TransactionBuilderConfigBuilder;

/**
* @param {number} max_value_size
* @returns {TransactionBuilderConfigBuilder}
*/
max_value_size(max_value_size: number): TransactionBuilderConfigBuilder;

/**
* @param {number} max_tx_size
* @returns {TransactionBuilderConfigBuilder}
*/
max_tx_size(max_tx_size: number): TransactionBuilderConfigBuilder;

/**
* @param {BigNum} coins_per_utxo_word
* @returns {TransactionBuilderConfigBuilder}
*/
coins_per_utxo_word(
coins_per_utxo_word: BigNum
): TransactionBuilderConfigBuilder;

/**
* @param {boolean} prefer_pure_change
* @returns {TransactionBuilderConfigBuilder}
*/
prefer_pure_change(
prefer_pure_change: boolean
): TransactionBuilderConfigBuilder;

/**
* @returns {TransactionBuilderConfig}
*/
build(): TransactionBuilderConfig;
}
/**
*/
declare export class TransactionHash {
Expand Down
Loading