Class

Operation

Operation()

Methods

# static accountMerge(opts) → {xdr.Operation}

Transfers native balance to destination account.

Parameters:
Name Type Attributes Description
opts object

options object

destination string

destination to merge the source account into

source string <optional>

operation source account (defaults to transaction source)

View Source js-stellar-base/src/operations/account_merge.js, line 17

an Account Merge operation (xdr.AccountMergeOp)

xdr.Operation

# static allowTrust(opts) → {xdr.AllowTrustOp}

Parameters:
Name Type Attributes Description
opts object

Options object

trustor string

The trusting account (the one being authorized)

assetCode string

The asset code being authorized.

authorize 0 | 1 | 2

1 to authorize, 2 to authorize to maintain liabilities, and 0 to deauthorize.

source string <optional>

The source account (defaults to transaction source).

Deprecated:
  • since v5.0 Returns an XDR AllowTrustOp. An "allow trust" operation authorizes another account to hold your account's credit for a given asset.

View Source js-stellar-base/src/operations/allow_trust.js, line 22

Allow Trust operation

xdr.AllowTrustOp

# static beginSponsoringFutureReserves(opts) → {xdr.Operation}

Create a "begin sponsoring future reserves" operation.

Parameters:
Name Type Attributes Description
opts object

Options object

sponsoredId string

The sponsored account id.

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

View Source js-stellar-base/src/operations/begin_sponsoring_future_reserves.js, line 20

xdr operation

xdr.Operation
Example
const op = Operation.beginSponsoringFutureReserves({
  sponsoredId: 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7'
});

# static bumpSequence(opts) → {xdr.BumpSequenceOp}

This operation bumps sequence number.

Parameters:
Name Type Attributes Description
opts object

Options object

bumpTo string

Sequence number to bump to.

source string <optional>

The optional source account.

View Source js-stellar-base/src/operations/bump_sequence.js, line 14

Operation

xdr.BumpSequenceOp

# static changeTrust(opts) → {xdr.ChangeTrustOp}

Returns an XDR ChangeTrustOp. A "change trust" operation adds, removes, or updates a trust line for a given asset from the source account to another.

Parameters:
Name Type Attributes Description
opts object

Options object

asset Asset | LiquidityPoolAsset

The asset for the trust line.

limit string <optional>

The limit for the asset, defaults to max int64. If the limit is set to "0" it deletes the trustline.

source string <optional>

The source account (defaults to transaction source).

View Source js-stellar-base/src/operations/change_trust.js, line 21

Change Trust operation

xdr.ChangeTrustOp

# static claimClaimableBalance(opts) → {xdr.Operation}

Create a new claim claimable balance operation.

Parameters:
Name Type Attributes Description
opts object

Options object

balanceId string

The claimable balance id to be claimed.

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

View Source js-stellar-base/src/operations/claim_claimable_balance.js, line 18

Claim claimable balance operation

xdr.Operation
Example
const op = Operation.claimClaimableBalance({
  balanceId: '00000000da0d57da7d4850e7fc10d2a9d0ebc731f7afb40574c03395b17d49149b91f5be',
});

# static clawback(opts) → {xdr.ClawbackOp}

Creates a clawback operation.

Parameters:
Name Type Attributes Description
opts object

Options object

asset Asset

The asset being clawed back.

amount string

The amount of the asset to claw back.

from string

The public key of the (optionally-muxed) account to claw back from.

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

See:

View Source js-stellar-base/src/operations/clawback.js, line 23

xdr.ClawbackOp

# static clawbackClaimableBalance(opts) → {xdr.ClawbackClaimableBalanceOp}

Creates a clawback operation for a claimable balance.

Parameters:
Name Type Attributes Description
opts object

Options object

balanceId string

The claimable balance ID to be clawed back.

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

View Source js-stellar-base/src/operations/clawback_claimable_balance.js, line 22

xdr.ClawbackClaimableBalanceOp
Example
const op = Operation.clawbackClaimableBalance({
  balanceId: '00000000da0d57da7d4850e7fc10d2a9d0ebc731f7afb40574c03395b17d49149b91f5be',
});

# static createAccount(opts) → {xdr.CreateAccountOp}

Create and fund a non existent account.

Parameters:
Name Type Attributes Description
opts object

Options object

destination string

Destination account ID to create an account for.

startingBalance string

Amount in XLM the account should be funded for. Must be greater than the reserve balance amount.

source string <optional>

The source account for the payment. Defaults to the transaction's source account.

View Source js-stellar-base/src/operations/create_account.js, line 16

Create account operation

xdr.CreateAccountOp

# static createClaimableBalance(opts) → {xdr.Operation}

Create a new claimable balance operation.

Parameters:
Name Type Attributes Description
opts object

Options object

asset Asset

The asset for the claimable balance.

amount string

Amount.

claimants Array.<Claimant>

An array of Claimants

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

View Source js-stellar-base/src/operations/create_claimable_balance.js, line 38

Create claimable balance operation

xdr.Operation
Example
const asset = new Asset(
  'USD',
  'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7'
);
const amount = '100.0000000';
const claimants = [
  new Claimant(
    'GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ',
     Claimant.predicateBeforeAbsoluteTime("4102444800000")
  )
];

const op = Operation.createClaimableBalance({
  asset,
  amount,
  claimants
});

# static createCustomContract(opts) → {xdr.Operation}

Returns an operation that creates a custom WASM contract and atomically invokes its constructor.

Parameters:
Name Type Attributes Description
opts any

the set of parameters

address Address

the contract uploader address

wasmHash Uint8Array | Buffer

the SHA-256 hash of the contract WASM you're uploading (see hash and Operation.uploadContractWasm)

constructorArgs Array.<xdr.ScVal> <optional>

the optional parameters to pass to the constructor of this contract (see nativeToScVal for ways to easily create these parameters from native JS values)

salt Uint8Array | Buffer <optional>

an optional, 32-byte salt to distinguish deployment instances of the same wasm from the same user (if omitted, one will be generated for you)

auth Array.<xdr.SorobanAuthorizationEntry> <optional>

an optional list outlining the tree of authorizations required for the call

source string <optional>

an optional source account

See:

View Source js-stellar-base/src/operations/invoke_host_function.js, line 120

an Invoke Host Function operation (xdr.InvokeHostFunctionOp)

xdr.Operation

# static createPassiveSellOffer(opts) → {xdr.CreatePassiveSellOfferOp}

Returns a XDR CreatePasiveSellOfferOp. A "create passive offer" operation creates an offer that won't consume a counter offer that exactly matches this offer. This is useful for offers just used as 1:1 exchanges for path payments. Use manage offer to manage this offer after using this operation to create it.

Parameters:
Name Type Attributes Description
opts object

Options object

selling Asset

What you're selling.

buying Asset

What you're buying.

amount string

The total amount you're selling. If 0, deletes the offer.

price number | string | BigNumber | Object

Price of 1 unit of selling in terms of buying.

price.n number

If opts.price is an object: the price numerator

price.d number

If opts.price is an object: the price denominator

source string <optional>

The source account (defaults to transaction source).

View Source js-stellar-base/src/operations/create_passive_sell_offer.js, line 21

Throws Error when the best rational approximation of price cannot be found.

Error

Create Passive Sell Offer operation

xdr.CreatePassiveSellOfferOp

# static createStellarAssetContract(opts) → {xdr.Operation}

Returns an operation that wraps a Stellar asset into a token contract.

Parameters:
Name Type Attributes Description
opts any

the set of parameters

asset Asset | string

the Stellar asset to wrap, either as an Asset object or in canonical form (SEP-11, code:issuer)

auth Array.<xdr.SorobanAuthorizationEntry> <optional>

an optional list outlining the tree of authorizations required for the call

source string <optional>

an optional source account

See:

View Source js-stellar-base/src/operations/invoke_host_function.js, line 178

an Invoke Host Function operation (xdr.InvokeHostFunctionOp)

xdr.Operation

# static endSponsoringFutureReserves(opts) → {xdr.Operation}

Create an "end sponsoring future reserves" operation.

Parameters:
Name Type Attributes Description
opts object

Options object

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

View Source js-stellar-base/src/operations/end_sponsoring_future_reserves.js, line 15

xdr operation

xdr.Operation
Example
const op = Operation.endSponsoringFutureReserves();

# static extendFootprintTtl(opts) → {xdr.Operation}

Builds an operation to bump the time-to-live (TTL) of the ledger keys. The keys for extension have to be provided in the read-only footprint of the transaction.

The only parameter of the operation itself is the new minimum TTL for all the provided entries. If an entry already has a higher TTL, then it will just be skipped.

TTL is the number of ledgers from the current ledger (exclusive) until the last ledger the entry is still considered alive (inclusive). Thus the exact ledger until the entries will live will only be determined when transaction has been applied.

The footprint has to be specified in the transaction. See TransactionBuilder's opts.sorobanData parameter, which is a xdr.SorobanTransactionData instance that contains fee data & resource usage as part of xdr.SorobanResources.

Parameters:
Name Type Attributes Description
opts object

object holding operation parameters

extendTo number

the minimum TTL that all the entries in the read-only footprint will have

source string <optional>

an optional source account

View Source js-stellar-base/src/operations/extend_footprint_ttl.js, line 33

an Extend Footprint TTL operation (xdr.ExtendFootprintTTLOp)

xdr.Operation

# static fromXDRObject(operation) → {Operation}

Deconstructs the raw XDR operation object into the structured object that was used to create the operation (i.e. the opts parameter to most ops).

Parameters:
Name Type Description
operation xdr.Operation

An XDR Operation.

View Source js-stellar-base/src/operation.js, line 123

Operation

# static inflation(optsopt) → {xdr.InflationOp}

This operation generates the inflation.

Parameters:
Name Type Attributes Description
opts object <optional>

Options object

source string <optional>

The optional source account.

View Source js-stellar-base/src/operations/inflation.js, line 11

Inflation operation

xdr.InflationOp

# static invokeContractFunction(opts) → {xdr.Operation}

Returns an operation that invokes a contract function.

Parameters:
Name Type Attributes Description
opts any

the set of parameters

contract string

a strkey-fied contract address (C...)

function string

the name of the contract fn to invoke

args Array.<xdr.ScVal>

parameters to pass to the function invocation (try nativeToScVal or ScInt to make building these easier)

auth Array.<xdr.SorobanAuthorizationEntry> <optional>

an optional list outlining the tree of authorizations required for the call

source string <optional>

an optional source account

See:

View Source js-stellar-base/src/operations/invoke_host_function.js, line 73

an Invoke Host Function operation (xdr.InvokeHostFunctionOp)

xdr.Operation

# static invokeHostFunction(opts) → {xdr.Operation}

Invokes a single smart contract host function.

Parameters:
Name Type Attributes Description
opts object

options object

func xdr.HostFunction

host function to execute (with its wrapped parameters)

auth Array.<xdr.SorobanAuthorizationEntry> <optional>

list outlining the tree of authorizations required for the call

source string <optional>

an optional source account

See:

View Source js-stellar-base/src/operations/invoke_host_function.js, line 30

an Invoke Host Function operation (xdr.InvokeHostFunctionOp)

xdr.Operation

# static isValidAmount(value, allowZero) → {boolean}

Validates that a given amount is possible for a Stellar asset.

Specifically, this means that the amount is well, a valid number, but also that it is within the int64 range and has no more than 7 decimal levels of precision.

Note that while smart contracts allow larger amounts, this is oriented towards validating the standard Stellar operations.

Parameters:
Name Type Default Description
value string

the amount to validate

allowZero boolean false

optionally, whether or not zero is valid (default: no)

View Source js-stellar-base/src/operation.js, line 420

boolean

# static liquidityPoolDeposit(opts) → {xdr.Operation}

Creates a liquidity pool deposit operation.

Parameters:
Name Type Attributes Description
opts object

Options object

liquidityPoolId string

The liquidity pool ID.

maxAmountA string

Maximum amount of first asset to deposit.

maxAmountB string

Maximum amount of second asset to deposit.

minPrice number | string | BigNumber | Object

Minimum depositA/depositB price.

minPrice.n number

If opts.minPrice is an object: the price numerator

minPrice.d number

If opts.minPrice is an object: the price denominator

maxPrice number | string | BigNumber | Object

Maximum depositA/depositB price.

maxPrice.n number

If opts.maxPrice is an object: the price numerator

maxPrice.d number

If opts.maxPrice is an object: the price denominator

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

See:

View Source js-stellar-base/src/operations/liquidity_pool_deposit.js, line 24

The resulting operation (xdr.LiquidityPoolDepositOp).

xdr.Operation

# static liquidityPoolWithdraw(opts) → {xdr.Operation}

Creates a liquidity pool withdraw operation.

Parameters:
Name Type Attributes Description
opts object

Options object

liquidityPoolId string

The liquidity pool ID.

amount string

Amount of pool shares to withdraw.

minAmountA string

Minimum amount of first asset to withdraw.

minAmountB string

Minimum amount of second asset to withdraw.

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

See:

View Source js-stellar-base/src/operations/liquidity_pool_withdraw.js, line 19

The resulting operation (xdr.LiquidityPoolWithdrawOp).

xdr.Operation

# static manageBuyOffer(opts) → {xdr.ManageBuyOfferOp}

Returns a XDR ManageBuyOfferOp. A "manage buy offer" operation creates, updates, or deletes a buy offer.

Parameters:
Name Type Attributes Description
opts object

Options object

selling Asset

What you're selling.

buying Asset

What you're buying.

buyAmount string

The total amount you're buying. If 0, deletes the offer.

price number | string | BigNumber | Object

Price of 1 unit of buying in terms of selling.

price.n number

If opts.price is an object: the price numerator

price.d number

If opts.price is an object: the price denominator

offerId number | string <optional>

If 0, will create a new offer (default). Otherwise, edits an exisiting offer.

source string <optional>

The source account (defaults to transaction source).

View Source js-stellar-base/src/operations/manage_buy_offer.js, line 20

Throws Error when the best rational approximation of price cannot be found.

Error

Manage Buy Offer operation

xdr.ManageBuyOfferOp

# static manageData(opts) → {xdr.ManageDataOp}

This operation adds data entry to the ledger.

Parameters:
Name Type Attributes Description
opts object

Options object

name string

The name of the data entry.

value string | Buffer

The value of the data entry.

source string <optional>

The optional source account.

View Source js-stellar-base/src/operations/manage_data.js, line 13

Manage Data operation

xdr.ManageDataOp

# static manageSellOffer(opts) → {xdr.ManageSellOfferOp}

Returns a XDR ManageSellOfferOp. A "manage sell offer" operation creates, updates, or deletes an offer.

Parameters:
Name Type Attributes Description
opts object

Options object

selling Asset

What you're selling.

buying Asset

What you're buying.

amount string

The total amount you're selling. If 0, deletes the offer.

price number | string | BigNumber | Object

Price of 1 unit of selling in terms of buying.

price.n number

If opts.price is an object: the price numerator

price.d number

If opts.price is an object: the price denominator

offerId number | string <optional>

If 0, will create a new offer (default). Otherwise, edits an exisiting offer.

source string <optional>

The source account (defaults to transaction source).

View Source js-stellar-base/src/operations/manage_sell_offer.js, line 20

Throws Error when the best rational approximation of price cannot be found.

Error

Manage Sell Offer operation

xdr.ManageSellOfferOp

# static pathPaymentStrictReceive(opts) → {xdr.PathPaymentStrictReceiveOp}

Creates a PathPaymentStrictReceive operation.

A PathPaymentStrictReceive operation sends the specified amount to the destination account. It credits the destination with destAmount of destAsset, while debiting at most sendMax of sendAsset from the source. The transfer optionally occurs through a path. XLM payments create the destination account if it does not exist.

Parameters:
Name Type Attributes Description
opts object

Options object

sendAsset Asset

asset to pay with

sendMax string

maximum amount of sendAsset to send

destination string

destination account to send to

destAsset Asset

asset the destination will receive

destAmount string

amount the destination receives

path Array.<Asset>

array of Asset objects to use as the path

source string <optional>

The source account for the payment. Defaults to the transaction's source account.

See:

View Source js-stellar-base/src/operations/path_payment_strict_receive.js, line 30

the resulting path payment op

xdr.PathPaymentStrictReceiveOp

# static pathPaymentStrictSend(opts) → {xdr.Operation}

Creates a PathPaymentStrictSend operation.

A PathPaymentStrictSend operation sends the specified amount to the destination account crediting at least destMin of destAsset, optionally through a path. XLM payments create the destination account if it does not exist.

Parameters:
Name Type Attributes Description
opts object

Options object

sendAsset Asset

asset to pay with

sendAmount string

amount of sendAsset to send (excluding fees)

destination string

destination account to send to

destAsset Asset

asset the destination will receive

destMin string

minimum amount of destAsset to be receive

path Array.<Asset>

array of Asset objects to use as the path

source string <optional>

The source account for the payment. Defaults to the transaction's source account.

See:

View Source js-stellar-base/src/operations/path_payment_strict_send.js, line 30

the resulting path payment operation (xdr.PathPaymentStrictSendOp)

xdr.Operation

# static payment(opts) → {xdr.Operation}

Create a payment operation.

Parameters:
Name Type Attributes Description
opts object

Options object

destination string

destination account ID

asset Asset

asset to send

amount string

amount to send

source string <optional>

The source account for the payment. Defaults to the transaction's source account.

See:

View Source js-stellar-base/src/operations/payment.js, line 21

The resulting payment operation (xdr.PaymentOp)

xdr.Operation

# static restoreFootprint(optsopt) → {xdr.Operation}

Builds an operation to restore the archived ledger entries specified by the ledger keys.

The ledger keys to restore are specified separately from the operation in read-write footprint of the transaction.

It takes no parameters because the relevant footprint is derived from the transaction itself. See TransactionBuilder's opts.sorobanData parameter (or TransactionBuilder.setSorobanData / TransactionBuilder.setLedgerKeys), which is a xdr.SorobanTransactionData instance that contains fee data & resource usage as part of xdr.SorobanTransactionData.

Parameters:
Name Type Attributes Description
opts object <optional>

an optional set of parameters

source string <optional>

an optional source account

View Source js-stellar-base/src/operations/restore_footprint.js, line 26

a Bump Footprint Expiration operation (xdr.RestoreFootprintOp)

xdr.Operation

# static revokeAccountSponsorship(opts) → {xdr.Operation}

Create a "revoke sponsorship" operation for an account.

Parameters:
Name Type Attributes Description
opts object

Options object

account string

The sponsored account ID.

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

View Source js-stellar-base/src/operations/revoke_sponsorship.js, line 23

xdr operation

xdr.Operation
Example
const op = Operation.revokeAccountSponsorship({
  account: 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7
});

# static revokeClaimableBalanceSponsorship(opts) → {xdr.Operation}

Create a "revoke sponsorship" operation for a claimable balance.

Parameters:
Name Type Attributes Description
opts object

Options object

balanceId string

The sponsored claimable balance ID.

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

View Source js-stellar-base/src/operations/revoke_sponsorship.js, line 186

xdr operation

xdr.Operation
Example
const op = Operation.revokeClaimableBalanceSponsorship({
  balanceId: '00000000da0d57da7d4850e7fc10d2a9d0ebc731f7afb40574c03395b17d49149b91f5be',
});

# static revokeDataSponsorship(opts) → {xdr.Operation}

Create a "revoke sponsorship" operation for a data entry.

Parameters:
Name Type Attributes Description
opts object

Options object

account string

The account ID which owns the data entry.

name string

The name of the data entry

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

View Source js-stellar-base/src/operations/revoke_sponsorship.js, line 148

xdr operation

xdr.Operation
Example
const op = Operation.revokeDataSponsorship({
  account: 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7
  name: 'foo'
});

# static revokeLiquidityPoolSponsorship(opts) → {xdr.Operation}

Creates a "revoke sponsorship" operation for a liquidity pool.

Parameters:
Name Type Attributes Description
opts object

– Options object.

liquidityPoolId string

The sponsored liquidity pool ID in 'hex' string.

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

View Source js-stellar-base/src/operations/revoke_sponsorship.js, line 220

xdr Operation.

xdr.Operation
Example
const op = Operation.revokeLiquidityPoolSponsorship({
  liquidityPoolId: 'dd7b1ab831c273310ddbec6f97870aa83c2fbd78ce22aded37ecbf4f3380fac7',
});

# static revokeOfferSponsorship(opts) → {xdr.Operation}

Create a "revoke sponsorship" operation for an offer.

Parameters:
Name Type Attributes Description
opts object

Options object

seller string

The account ID which created the offer.

offerId string

The offer ID.

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

View Source js-stellar-base/src/operations/revoke_sponsorship.js, line 108

xdr operation

xdr.Operation
Example
const op = Operation.revokeOfferSponsorship({
  seller: 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7
  offerId: '1234'
});

# static revokeSignerSponsorship(opts) → {xdr.Operation}

Create a "revoke sponsorship" operation for a signer.

Parameters:
Name Type Attributes Description
opts object

Options object

account string

The account ID where the signer sponsorship is being removed from.

signer object

The signer whose sponsorship is being removed.

signer.ed25519PublicKey string <optional>

The ed25519 public key of the signer.

signer.sha256Hash Buffer | string <optional>

sha256 hash (Buffer or hex string).

signer.preAuthTx Buffer | string <optional>

Hash (Buffer or hex string) of transaction.

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

View Source js-stellar-base/src/operations/revoke_sponsorship.js, line 263

xdr operation

xdr.Operation
Example
const op = Operation.revokeSignerSponsorship({
  account: 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7
  signer: {
    ed25519PublicKey: 'GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ'
  }
})

# static revokeTrustlineSponsorship(opts) → {xdr.Operation}

Create a "revoke sponsorship" operation for a trustline.

Parameters:
Name Type Attributes Description
opts object

Options object

account string

The account ID which owns the trustline.

asset Asset | LiquidityPoolId

The trustline asset.

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

View Source js-stellar-base/src/operations/revoke_sponsorship.js, line 62

xdr operation

xdr.Operation
Example
const op = Operation.revokeTrustlineSponsorship({
  account: 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7
  asset: new StellarBase.LiquidityPoolId(
    'USDUSD',
    'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7'
  )
});

# static setOptions(opts) → {xdr.SetOptionsOp}

Returns an XDR SetOptionsOp. A "set options" operations set or clear account flags, set the account's inflation destination, and/or add new signers to the account. The flags used in opts.clearFlags and opts.setFlags can be the following:

It's possible to set/clear multiple flags at once using logical or.

Parameters:
Name Type Attributes Description
opts object

Options object

inflationDest string <optional>

Set this account ID as the account's inflation destination.

clearFlags number | string <optional>

Bitmap integer for which account flags to clear.

setFlags number | string <optional>

Bitmap integer for which account flags to set.

masterWeight number | string <optional>

The master key weight.

lowThreshold number | string <optional>

The sum weight for the low threshold.

medThreshold number | string <optional>

The sum weight for the medium threshold.

highThreshold number | string <optional>

The sum weight for the high threshold.

signer object <optional>

Add or remove a signer from the account. The signer is deleted if the weight is 0. Only one of ed25519PublicKey, sha256Hash, preAuthTx should be defined.

signer.ed25519PublicKey string <optional>

The ed25519 public key of the signer.

signer.sha256Hash Buffer | string <optional>

sha256 hash (Buffer or hex string) of preimage that will unlock funds. Preimage should be used as signature of future transaction.

signer.preAuthTx Buffer | string <optional>

Hash (Buffer or hex string) of transaction that will unlock funds.

signer.ed25519SignedPayload string <optional>

Signed payload signer (ed25519 public key + raw payload) for atomic transaction signature disclosure.

signer.weight number | string <optional>

The weight of the new signer (0 to delete or 1-255)

homeDomain string <optional>

sets the home domain used for reverse federation lookup.

source string <optional>

The source account (defaults to transaction source).

See:

View Source js-stellar-base/src/operations/set_options.js, line 49

XDR operation

xdr.SetOptionsOp

# static setTrustLineFlags(opts) → {xdr.SetTrustLineFlagsOp}

Creates a trustline flag configuring operation.

For the flags, set them to true to enable them and false to disable them. Any unmodified operations will be marked undefined in the result.

Note that you can only clear the clawbackEnabled flag set; it must be set account-wide via operations.SetOptions (setting xdr.AccountFlags.clawbackEnabled).

Parameters:
Name Type Attributes Description
opts object

Options object

trustor string

the account whose trustline this is

asset Asset

the asset on the trustline

flags object

the set of flags to modify

flags.authorized bool <optional>

authorize account to perform transactions with its credit

flags.authorizedToMaintainLiabilities bool <optional>

authorize account to maintain and reduce liabilities for its credit

flags.clawbackEnabled bool <optional>

stop claimable balances on this trustlines from having clawbacks enabled (this flag can only be set to false!)

source string <optional>

The source account for the operation. Defaults to the transaction's source account.

See:

View Source js-stellar-base/src/operations/set_trustline_flags.js, line 41

xdr.SetTrustLineFlagsOp

# static uploadContractWasm(opts) → {xdr.Operation}

Returns an operation that uploads WASM for a contract.

Parameters:
Name Type Attributes Description
opts any

the set of parameters

wasm Uint8Array | Buffer

a WASM blob to upload to the ledger

auth Array.<xdr.SorobanAuthorizationEntry> <optional>

an optional list outlining the tree of authorizations required for the call

source string <optional>

an optional source account

See:

View Source js-stellar-base/src/operations/invoke_host_function.js, line 221

an Invoke Host Function operation (xdr.InvokeHostFunctionOp)

xdr.Operation