Class: Transaction
Transaction Builder
Constructors
new Transaction()
new Transaction():
Transaction
Returns
Properties
object()
object: (
value) =>object
Add a new object input to the transaction.
Parameters
• value: TransactionObjectInput
Returns
object
$kind
$kind:
"Input"
Input
Input:
number
type?
optionaltype:"object"
system()
Returns
object
$kind
$kind:
"Input"
Input
Input:
number
type?
optionaltype:"object"
clock()
Returns
object
$kind
$kind:
"Input"
Input
Input:
number
type?
optionaltype:"object"
random()
Returns
object
$kind
$kind:
"Input"
Input
Input:
number
type?
optionaltype:"object"
denyList()
Returns
object
$kind
$kind:
"Input"
Input
Input:
number
type?
optionaltype:"object"
option()
Parameters
• __namedParameters
• __namedParameters.type: string
• __namedParameters.value: null | TransactionObjectInput
Returns
Function
Parameters
• tx: Transaction
Returns
Accessors
blockData
Get Signature
get blockData():
object
Deprecated
Use getData() instead.
Returns
object
version
version:
1
sender?
optionalsender:string
expiration?
optionalexpiration:null|object|object
gasConfig
gasConfig:
object=GasConfig
gasConfig.budget?
optionalbudget:string|number|bigint
gasConfig.price?
optionalprice:string|number|bigint
gasConfig.payment?
optionalpayment:object[]
gasConfig.owner?
optionalowner:string
inputs
inputs: (
object|object)[]
transactions
transactions: (
object|object|object|object|object|object|object)[]
pure
Get Signature
get pure(): <
T>(type,value) =>T(value) =>T
Returns
Function
Type Parameters
• T extends PureTypeName
Parameters
• type: T extends PureTypeName ? ValidPureTypeName<T<T>> : T
• value: ShapeFromPureTypeName<T>
Returns
T
Parameters
• value: Uint8Array | SerializedBcs<any, any>
The pure value, serialized to BCS. If this is a Uint8Array, then the value is assumed to be raw bytes, and will be used directly.
Returns
T
u8()
Parameters
• value: number
Returns
object | object | object | object | object
u16()
Parameters
• value: number
Returns
object | object | object | object | object
u32()
Parameters
• value: number
Returns
object | object | object | object | object
u64()
Parameters
• value: string | number | bigint
Returns
object | object | object | object | object
u128()
Parameters
• value: string | number | bigint
Returns
object | object | object | object | object
u256()
Parameters
• value: string | number | bigint
Returns
object | object | object | object | object
bool()
Parameters
• value: boolean
Returns
object | object | object | object | object
string()
Parameters
• value: string
Returns
object | object | object | object | object
address()
Parameters
• value: string
Returns
object | object | object | object | object
id()
id: (
value) =>object|object|object|object|object
Parameters
• value: string
Returns
object | object | object | object | object
vector()
Type Parameters
• Type extends PureTypeName
Parameters
• type: Type
• value: Iterable<ShapeFromPureTypeName<Type>, any, any> & object
Returns
object | object | object | object | object
option()
Type Parameters
• Type extends PureTypeName
Parameters
• type: Type
• value: undefined | null | ShapeFromPureTypeName<Type>
Returns
object | object | object | object | object
gas
Get Signature
get gas():
object
Returns an argument for the gas coin, to be used in a transaction.
Returns
object
$kind
$kind:
"GasCoin"
GasCoin
GasCoin:
true
Methods
fromKind()
staticfromKind(serialized):Transaction
Converts from a serialize transaction kind (built with build({ onlyTransactionKind: true })) to a Transaction class.
Supports either a byte array, or base64-encoded bytes.