Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e7d1225
Add library docs
DaughterOfMars Oct 14, 2025
d63b8f5
Add method docs and more info
DaughterOfMars Oct 14, 2025
f800cea
missed
DaughterOfMars Oct 14, 2025
e02f672
use main fn
DaughterOfMars Oct 14, 2025
c81e124
review
DaughterOfMars Oct 14, 2025
f8defa8
Update crates/iota-transaction-builder/src/lib.rs
DaughterOfMars Oct 16, 2025
e53a9f0
fix fmt
DaughterOfMars Oct 16, 2025
cb70f29
Merge branch 'sdk-bindings' into chore/txn-builder-docs
DaughterOfMars Oct 16, 2025
ba68f92
review and add docs to FFI
DaughterOfMars Oct 20, 2025
a6cfbf6
Merge branch 'sdk-bindings' into chore/txn-builder-docs
DaughterOfMars Oct 20, 2025
b738f58
fix link
DaughterOfMars Oct 20, 2025
b51c4ac
fix docs
DaughterOfMars Oct 20, 2025
b681377
move lib doc to README
DaughterOfMars Oct 20, 2025
37a2138
Remove feature flag section
DaughterOfMars Oct 20, 2025
67da2c8
Update crates/iota-sdk-ffi/src/transaction_builder/mod.rs
DaughterOfMars Oct 20, 2025
367c635
allow some more lints and re gen bindings
DaughterOfMars Oct 20, 2025
e3af51d
Merge branch 'chore/txn-builder-docs' of https://github.com/iotaledge…
DaughterOfMars Oct 20, 2025
3be7d0c
Merge branch 'sdk-bindings' into chore/txn-builder-docs
DaughterOfMars Oct 20, 2025
7dbde27
dprint and bindings again
DaughterOfMars Oct 20, 2025
9531a46
Update crates/iota-sdk-ffi/README.md
DaughterOfMars Oct 21, 2025
04f47a1
Remove useless doc links in ffi crate
DaughterOfMars Oct 21, 2025
3362101
bindings and fix links
DaughterOfMars Oct 21, 2025
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
33 changes: 28 additions & 5 deletions bindings/go/iota_sdk_ffi/iota_sdk_ffi.go
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,7 @@ func uniffiCheckChecksums() {
checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
return C.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields()
})
if checksum != 6963 {
if checksum != 32922 {
// If this happens try cleaning and rebuilding your project
panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields: UniFFI API checksum mismatch")
}
Expand Down Expand Up @@ -3734,6 +3734,15 @@ func uniffiCheckChecksums() {
}
}
{
checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
return C.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_coins()
})
if checksum != 13036 {
// If this happens try cleaning and rebuilding your project
panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_coins: UniFFI API checksum mismatch")
}
}
{
checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
return C.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price()
})
Expand Down Expand Up @@ -12367,7 +12376,8 @@ type GraphQlClientInterface interface {
// Get a page of dynamic fields for the provided address. Note that this
// will also fetch dynamic fields on wrapped objects.
//
// This returns [`Page`] of [`DynamicFieldOutput`]s.
// This returns a page of
// [`DynamicFieldOutput`s](crate::types::graphql::DynamicFieldOutput).
DynamicFields(address *Address, paginationFilter *PaginationFilter) (DynamicFieldOutputPage, error)
// Access a dynamic object field on an object using its name. Names are
// arbitrary Move values whose type have copy, drop, and store, and are
Expand Down Expand Up @@ -12936,7 +12946,8 @@ func (_self *GraphQlClient) DynamicField(address *Address, typeTag *TypeTag, nam
// Get a page of dynamic fields for the provided address. Note that this
// will also fetch dynamic fields on wrapped objects.
//
// This returns [`Page`] of [`DynamicFieldOutput`]s.
// This returns a page of
// [`DynamicFieldOutput`s](crate::types::graphql::DynamicFieldOutput).
func (_self *GraphQlClient) DynamicFields(address *Address, paginationFilter *PaginationFilter) (DynamicFieldOutputPage, error) {
_pointer := _self.ffiObject.incrementPointer("*GraphQlClient")
defer _self.ffiObject.decrementPointer()
Expand Down Expand Up @@ -22210,6 +22221,8 @@ type TransactionBuilderInterface interface {
Gas(objectId *ObjectId) *TransactionBuilder
// Set the gas budget for the transaction.
GasBudget(budget uint64) *TransactionBuilder
// Add gas objects to pay for the transaction.
GasCoins(objectIds []*ObjectId) *TransactionBuilder
// Set the gas price for the transaction.
GasPrice(price uint64) *TransactionBuilder
// Set the gas station sponsor.
Expand Down Expand Up @@ -22452,6 +22465,16 @@ func (_self *TransactionBuilder) GasBudget(budget uint64) *TransactionBuilder {
}))
}

// Add gas objects to pay for the transaction.
func (_self *TransactionBuilder) GasCoins(objectIds []*ObjectId) *TransactionBuilder {
_pointer := _self.ffiObject.incrementPointer("*TransactionBuilder")
defer _self.ffiObject.decrementPointer()
return FfiConverterTransactionBuilderINSTANCE.Lift(rustCall(func(_uniffiStatus *C.RustCallStatus) unsafe.Pointer {
return C.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_coins(
_pointer,FfiConverterSequenceObjectIdINSTANCE.Lower(objectIds),_uniffiStatus)
}))
}

// Set the gas price for the transaction.
func (_self *TransactionBuilder) GasPrice(price uint64) *TransactionBuilder {
_pointer := _self.ffiObject.incrementPointer("*TransactionBuilder")
Expand Down Expand Up @@ -25507,7 +25530,7 @@ func (_ FfiDestroyerZkLoginProof) Destroy(value *ZkLoginProof) {
// address-seed-unpadded = %x00 / %x01-ff *31(OCTET)
// ```
//
// [`Address`]: crate::Address
// [`Address`]: crate::types::address::Address
type ZkLoginPublicIdentifierInterface interface {
AddressSeed() *Bn254FieldElement
// Provides an iterator over the addresses that correspond to this zklogin
Expand Down Expand Up @@ -25586,7 +25609,7 @@ type ZkLoginPublicIdentifierInterface interface {
// address-seed-unpadded = %x00 / %x01-ff *31(OCTET)
// ```
//
// [`Address`]: crate::Address
// [`Address`]: crate::types::address::Address
type ZkLoginPublicIdentifier struct {
ffiObject FfiObject
}
Expand Down
11 changes: 11 additions & 0 deletions bindings/go/iota_sdk_ffi/iota_sdk_ffi.h
Original file line number Diff line number Diff line change
Expand Up @@ -4314,6 +4314,11 @@ void* uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas(void* ptr, void* obje
void* uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_budget(void* ptr, uint64_t budget, RustCallStatus *out_status
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_TRANSACTIONBUILDER_GAS_COINS
#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_TRANSACTIONBUILDER_GAS_COINS
void* uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_coins(void* ptr, RustBuffer object_ids, RustCallStatus *out_status
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_TRANSACTIONBUILDER_GAS_PRICE
#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_TRANSACTIONBUILDER_GAS_PRICE
void* uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_price(void* ptr, uint64_t price, RustCallStatus *out_status
Expand Down Expand Up @@ -7842,6 +7847,12 @@ uint16_t uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas(void
#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_TRANSACTIONBUILDER_GAS_BUDGET
uint16_t uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_budget(void

);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_TRANSACTIONBUILDER_GAS_COINS
#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_TRANSACTIONBUILDER_GAS_COINS
uint16_t uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_coins(void

);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_TRANSACTIONBUILDER_GAS_PRICE
Expand Down
41 changes: 36 additions & 5 deletions bindings/kotlin/lib/iota_sdk/iota_sdk_ffi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2451,6 +2451,8 @@ internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback {








Expand Down Expand Up @@ -3219,6 +3221,8 @@ fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas(
): Short
fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_budget(
): Short
fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_coins(
): Short
fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price(
): Short
fun uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_station_sponsor(
Expand Down Expand Up @@ -5594,6 +5598,8 @@ fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas(`ptr`: Pointer,`objectI
): Pointer
fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_budget(`ptr`: Pointer,`budget`: Long,uniffi_out_err: UniffiRustCallStatus,
): Pointer
fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_coins(`ptr`: Pointer,`objectIds`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
): Pointer
fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_price(`ptr`: Pointer,`price`: Long,uniffi_out_err: UniffiRustCallStatus,
): Pointer
fun uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_station_sponsor(`ptr`: Pointer,`url`: RustBuffer.ByValue,`duration`: RustBuffer.ByValue,`headers`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
Expand Down Expand Up @@ -6450,7 +6456,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_field() != 17199.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields() != 6963.toShort()) {
if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields() != 32922.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_object_field() != 47284.toShort()) {
Expand Down Expand Up @@ -7239,6 +7245,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_budget() != 48686.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_coins() != 13036.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price() != 7437.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand Down Expand Up @@ -19834,7 +19843,8 @@ public interface GraphQlClientInterface {
* Get a page of dynamic fields for the provided address. Note that this
* will also fetch dynamic fields on wrapped objects.
*
* This returns [`Page`] of [`DynamicFieldOutput`]s.
* This returns a page of
* [`DynamicFieldOutput`s](crate::types::graphql::DynamicFieldOutput).
*/
suspend fun `dynamicFields`(`address`: Address, `paginationFilter`: PaginationFilter? = null): DynamicFieldOutputPage

Expand Down Expand Up @@ -20486,7 +20496,8 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface
* Get a page of dynamic fields for the provided address. Note that this
* will also fetch dynamic fields on wrapped objects.
*
* This returns [`Page`] of [`DynamicFieldOutput`]s.
* This returns a page of
* [`DynamicFieldOutput`s](crate::types::graphql::DynamicFieldOutput).
*/
@Throws(SdkFfiException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
Expand Down Expand Up @@ -38714,6 +38725,11 @@ public interface TransactionBuilderInterface {
*/
fun `gasBudget`(`budget`: kotlin.ULong): TransactionBuilder

/**
* Add gas objects to pay for the transaction.
*/
fun `gasCoins`(`objectIds`: List<ObjectId>): TransactionBuilder

/**
* Set the gas price for the transaction.
*/
Expand Down Expand Up @@ -39030,6 +39046,21 @@ open class TransactionBuilder: Disposable, AutoCloseable, TransactionBuilderInte



/**
* Add gas objects to pay for the transaction.
*/override fun `gasCoins`(`objectIds`: List<ObjectId>): TransactionBuilder {
return FfiConverterTypeTransactionBuilder.lift(
callWithPointer {
uniffiRustCall() { _status ->
UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_coins(
it, FfiConverterSequenceTypeObjectId.lower(`objectIds`),_status)
}
}
)
}



/**
* Set the gas price for the transaction.
*/override fun `gasPrice`(`price`: kotlin.ULong): TransactionBuilder {
Expand Down Expand Up @@ -45808,7 +45839,7 @@ public object FfiConverterTypeZkLoginProof: FfiConverter<ZkLoginProof, Pointer>
* address-seed-unpadded = %x00 / %x01-ff *31(OCTET)
* ```
*
* [`Address`]: crate::Address
* [`Address`]: crate::types::address::Address
*/
public interface ZkLoginPublicIdentifierInterface {

Expand Down Expand Up @@ -45903,7 +45934,7 @@ public interface ZkLoginPublicIdentifierInterface {
* address-seed-unpadded = %x00 / %x01-ff *31(OCTET)
* ```
*
* [`Address`]: crate::Address
* [`Address`]: crate::types::address::Address
*/
open class ZkLoginPublicIdentifier: Disposable, AutoCloseable, ZkLoginPublicIdentifierInterface
{
Expand Down
45 changes: 40 additions & 5 deletions bindings/python/lib/iota_sdk_ffi.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def _uniffi_check_api_checksums(lib):
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_field() != 17199:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields() != 6963:
if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields() != 32922:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_object_field() != 47284:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
Expand Down Expand Up @@ -1211,6 +1211,8 @@ def _uniffi_check_api_checksums(lib):
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_budget() != 48686:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_coins() != 13036:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price() != 7437:
raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
if lib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_station_sponsor() != 41106:
Expand Down Expand Up @@ -6110,6 +6112,12 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure):
ctypes.POINTER(_UniffiRustCallStatus),
)
_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_budget.restype = ctypes.c_void_p
_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_coins.argtypes = (
ctypes.c_void_p,
_UniffiRustBuffer,
ctypes.POINTER(_UniffiRustCallStatus),
)
_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_coins.restype = ctypes.c_void_p
_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_price.argtypes = (
ctypes.c_void_p,
ctypes.c_uint64,
Expand Down Expand Up @@ -8540,6 +8548,9 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure):
_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_budget.argtypes = (
)
_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_budget.restype = ctypes.c_uint16
_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_coins.argtypes = (
)
_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_coins.restype = ctypes.c_uint16
_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price.argtypes = (
)
_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactionbuilder_gas_price.restype = ctypes.c_uint16
Expand Down Expand Up @@ -28077,7 +28088,8 @@ def dynamic_fields(self, address: "Address",pagination_filter: "typing.Union[obj
Get a page of dynamic fields for the provided address. Note that this
will also fetch dynamic fields on wrapped objects.

This returns [`Page`] of [`DynamicFieldOutput`]s.
This returns a page of
[`DynamicFieldOutput`s](crate::types::graphql::DynamicFieldOutput).
"""

raise NotImplementedError
Expand Down Expand Up @@ -28805,7 +28817,8 @@ async def dynamic_fields(self, address: "Address",pagination_filter: "typing.Uni
Get a page of dynamic fields for the provided address. Note that this
will also fetch dynamic fields on wrapped objects.

This returns [`Page`] of [`DynamicFieldOutput`]s.
This returns a page of
[`DynamicFieldOutput`s](crate::types::graphql::DynamicFieldOutput).
"""

_UniffiConverterTypeAddress.check_lower(address)
Expand Down Expand Up @@ -38458,6 +38471,12 @@ def gas_budget(self, budget: "int"):
Set the gas budget for the transaction.
"""

raise NotImplementedError
def gas_coins(self, object_ids: "typing.List[ObjectId]"):
"""
Add gas objects to pay for the transaction.
"""

raise NotImplementedError
def gas_price(self, price: "int"):
"""
Expand Down Expand Up @@ -38773,6 +38792,22 @@ def gas_budget(self, budget: "int") -> "TransactionBuilder":



def gas_coins(self, object_ids: "typing.List[ObjectId]") -> "TransactionBuilder":
"""
Add gas objects to pay for the transaction.
"""

_UniffiConverterSequenceTypeObjectId.check_lower(object_ids)

return _UniffiConverterTypeTransactionBuilder.lift(
_uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactionbuilder_gas_coins,self._uniffi_clone_pointer(),
_UniffiConverterSequenceTypeObjectId.lower(object_ids))
)





def gas_price(self, price: "int") -> "TransactionBuilder":
"""
Set the gas price for the transaction.
Expand Down Expand Up @@ -42089,7 +42124,7 @@ class ZkLoginPublicIdentifierProtocol(typing.Protocol):
address-seed-unpadded = %x00 / %x01-ff *31(OCTET)
```

[`Address`]: crate::Address
[`Address`]: crate::types::address::Address
"""

def address_seed(self, ):
Expand Down Expand Up @@ -42185,7 +42220,7 @@ class ZkLoginPublicIdentifier():
address-seed-unpadded = %x00 / %x01-ff *31(OCTET)
```

[`Address`]: crate::Address
[`Address`]: crate::types::address::Address
"""

_pointer: ctypes.c_void_p
Expand Down
Loading