Skip to content
Open
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
61 changes: 51 additions & 10 deletions bindings/go/iota_sdk_ffi/iota_sdk_ffi.go
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ func uniffiCheckChecksums() {
checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
return C.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins()
})
if checksum != 50359 {
if checksum != 47450 {
// If this happens try cleaning and rebuilding your project
panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins: UniFFI API checksum mismatch")
}
Expand Down Expand Up @@ -1421,6 +1421,15 @@ func uniffiCheckChecksums() {
}
}
{
checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
return C.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_gas_coins()
})
if checksum != 24826 {
// If this happens try cleaning and rebuilding your project
panic("iota_sdk_ffi: uniffi_iota_sdk_ffi_checksum_method_graphqlclient_gas_coins: UniFFI API checksum mismatch")
}
}
{
checksum := rustCall(func(_uniffiStatus *C.RustCallStatus) C.uint16_t {
return C.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_default_name()
})
Expand Down Expand Up @@ -12049,10 +12058,9 @@ type GraphQlClientInterface interface {
CoinMetadata(coinType string) (*CoinMetadata, error)
// Get the list of coins for the specified address.
//
// If `coin_type` is not provided, it will default to `0x2::coin::Coin`,
// which will return all coins. For IOTA coin, pass in the coin type:
// `0x2::coin::Coin<0x2::iota::IOTA>`.
Coins(owner *Address, paginationFilter *PaginationFilter, coinType *string) (CoinPage, error)
// If `coin_type` is not provided, all coins will be returned. For IOTA
// coins, pass in the coin type: `0x2::iota::IOTA`.
Coins(owner *Address, paginationFilter *PaginationFilter, coinType **StructTag) (CoinPage, error)
// Dry run a [`Transaction`] and return the transaction effects and dry run
// error (if any).
//
Expand Down Expand Up @@ -12122,6 +12130,8 @@ type GraphQlClientInterface interface {
Events(filter *EventFilter, paginationFilter *PaginationFilter) (EventPage, error)
// Execute a transaction.
ExecuteTx(signatures []*UserSignature, tx *Transaction) (**TransactionEffects, error)
// Get the list of gas coins for the specified address.
GasCoins(owner *Address, paginationFilter *PaginationFilter) (CoinPage, error)
// Get the default name pointing to this address, if one exists.
IotaNamesDefaultName(address *Address, format *NameFormat) (**Name, error)
// Return the resolved address for the given name.
Expand Down Expand Up @@ -12497,10 +12507,9 @@ func (_self *GraphQlClient) CoinMetadata(coinType string) (*CoinMetadata, error)

// Get the list of coins for the specified address.
//
// If `coin_type` is not provided, it will default to `0x2::coin::Coin`,
// which will return all coins. For IOTA coin, pass in the coin type:
// `0x2::coin::Coin<0x2::iota::IOTA>`.
func (_self *GraphQlClient) Coins(owner *Address, paginationFilter *PaginationFilter, coinType *string) (CoinPage, error) {
// If `coin_type` is not provided, all coins will be returned. For IOTA
// coins, pass in the coin type: `0x2::iota::IOTA`.
func (_self *GraphQlClient) Coins(owner *Address, paginationFilter *PaginationFilter, coinType **StructTag) (CoinPage, error) {
_pointer := _self.ffiObject.incrementPointer("*GraphQlClient")
defer _self.ffiObject.decrementPointer()
res, err :=uniffiRustCallAsync[SdkFfiError](
Expand All @@ -12517,7 +12526,7 @@ func (_self *GraphQlClient) Coins(owner *Address, paginationFilter *PaginationFi
return FfiConverterCoinPageINSTANCE.Lift(ffi)
},
C.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins(
_pointer,FfiConverterAddressINSTANCE.Lower(owner), FfiConverterOptionalPaginationFilterINSTANCE.Lower(paginationFilter), FfiConverterOptionalStringINSTANCE.Lower(coinType)),
_pointer,FfiConverterAddressINSTANCE.Lower(owner), FfiConverterOptionalPaginationFilterINSTANCE.Lower(paginationFilter), FfiConverterOptionalStructTagINSTANCE.Lower(coinType)),
// pollFn
func (handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {
C.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(handle, continuation, data)
Expand Down Expand Up @@ -12900,6 +12909,38 @@ func (_self *GraphQlClient) ExecuteTx(signatures []*UserSignature, tx *Transacti
return res, err
}

// Get the list of gas coins for the specified address.
func (_self *GraphQlClient) GasCoins(owner *Address, paginationFilter *PaginationFilter) (CoinPage, error) {
_pointer := _self.ffiObject.incrementPointer("*GraphQlClient")
defer _self.ffiObject.decrementPointer()
res, err :=uniffiRustCallAsync[SdkFfiError](
FfiConverterSdkFfiErrorINSTANCE,
// completeFn
func(handle C.uint64_t, status *C.RustCallStatus) RustBufferI {
res := C.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(handle, status)
return GoRustBuffer {
inner: res,
}
},
// liftFn
func(ffi RustBufferI) CoinPage {
return FfiConverterCoinPageINSTANCE.Lift(ffi)
},
C.uniffi_iota_sdk_ffi_fn_method_graphqlclient_gas_coins(
_pointer,FfiConverterAddressINSTANCE.Lower(owner), FfiConverterOptionalPaginationFilterINSTANCE.Lower(paginationFilter)),
// pollFn
func (handle C.uint64_t, continuation C.UniffiRustFutureContinuationCallback, data C.uint64_t) {
C.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(handle, continuation, data)
},
// freeFn
func (handle C.uint64_t) {
C.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(handle)
},
)

return res, err
}

// Get the default name pointing to this address, if one exists.
func (_self *GraphQlClient) IotaNamesDefaultName(address *Address, format *NameFormat) (**Name, error) {
_pointer := _self.ffiObject.incrementPointer("*GraphQlClient")
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 @@ -1725,6 +1725,11 @@ uint64_t uniffi_iota_sdk_ffi_fn_method_graphqlclient_events(void* ptr, RustBuffe
uint64_t uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx(void* ptr, RustBuffer signatures, void* tx
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_GRAPHQLCLIENT_GAS_COINS
#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_GRAPHQLCLIENT_GAS_COINS
uint64_t uniffi_iota_sdk_ffi_fn_method_graphqlclient_gas_coins(void* ptr, void* owner, RustBuffer pagination_filter
);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_GRAPHQLCLIENT_IOTA_NAMES_DEFAULT_NAME
#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_FN_METHOD_GRAPHQLCLIENT_IOTA_NAMES_DEFAULT_NAME
uint64_t uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_default_name(void* ptr, void* address, RustBuffer format
Expand Down Expand Up @@ -6122,6 +6127,12 @@ uint16_t uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events(void
#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_GRAPHQLCLIENT_EXECUTE_TX
uint16_t uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx(void

);
#endif
#ifndef UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_GRAPHQLCLIENT_GAS_COINS
#define UNIFFI_FFIDEF_UNIFFI_IOTA_SDK_FFI_CHECKSUM_METHOD_GRAPHQLCLIENT_GAS_COINS
uint16_t uniffi_iota_sdk_ffi_checksum_method_graphqlclient_gas_coins(void

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








Expand Down Expand Up @@ -2641,6 +2643,8 @@ fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events(
): Short
fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx(
): Short
fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_gas_coins(
): Short
fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_default_name(
): Short
fun uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_lookup(
Expand Down Expand Up @@ -4444,6 +4448,8 @@ fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_events(`ptr`: Pointer,`filter`:
): Long
fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx(`ptr`: Pointer,`signatures`: RustBuffer.ByValue,`tx`: Pointer,
): Long
fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_gas_coins(`ptr`: Pointer,`owner`: Pointer,`paginationFilter`: RustBuffer.ByValue,
): Long
fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_default_name(`ptr`: Pointer,`address`: Pointer,`format`: RustBuffer.ByValue,
): Long
fun uniffi_iota_sdk_ffi_fn_method_graphqlclient_iota_names_lookup(`ptr`: Pointer,`name`: RustBuffer.ByValue,
Expand Down Expand Up @@ -6243,7 +6249,7 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coin_metadata() != 10872.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins() != 50359.toShort()) {
if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins() != 47450.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx() != 12272.toShort()) {
Expand Down Expand Up @@ -6276,6 +6282,9 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx() != 41079.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_gas_coins() != 24826.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_iota_names_default_name() != 53764.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand Down Expand Up @@ -19484,11 +19493,10 @@ public interface GraphQlClientInterface {
/**
* Get the list of coins for the specified address.
*
* If `coin_type` is not provided, it will default to `0x2::coin::Coin`,
* which will return all coins. For IOTA coin, pass in the coin type:
* `0x2::coin::Coin<0x2::iota::IOTA>`.
* If `coin_type` is not provided, all coins will be returned. For IOTA
* coins, pass in the coin type: `0x2::iota::IOTA`.
*/
suspend fun `coins`(`owner`: Address, `paginationFilter`: PaginationFilter? = null, `coinType`: kotlin.String? = null): CoinPage
suspend fun `coins`(`owner`: Address, `paginationFilter`: PaginationFilter? = null, `coinType`: StructTag? = null): CoinPage

/**
* Dry run a [`Transaction`] and return the transaction effects and dry run
Expand Down Expand Up @@ -19589,6 +19597,11 @@ public interface GraphQlClientInterface {
*/
suspend fun `executeTx`(`signatures`: List<UserSignature>, `tx`: Transaction): TransactionEffects?

/**
* Get the list of gas coins for the specified address.
*/
suspend fun `gasCoins`(`owner`: Address, `paginationFilter`: PaginationFilter? = null): CoinPage

/**
* Get the default name pointing to this address, if one exists.
*/
Expand Down Expand Up @@ -20056,18 +20069,17 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface
/**
* Get the list of coins for the specified address.
*
* If `coin_type` is not provided, it will default to `0x2::coin::Coin`,
* which will return all coins. For IOTA coin, pass in the coin type:
* `0x2::coin::Coin<0x2::iota::IOTA>`.
* If `coin_type` is not provided, all coins will be returned. For IOTA
* coins, pass in the coin type: `0x2::iota::IOTA`.
*/
@Throws(SdkFfiException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
override suspend fun `coins`(`owner`: Address, `paginationFilter`: PaginationFilter?, `coinType`: kotlin.String?) : CoinPage {
override suspend fun `coins`(`owner`: Address, `paginationFilter`: PaginationFilter?, `coinType`: StructTag?) : CoinPage {
return uniffiRustCallAsync(
callWithPointer { thisPtr ->
UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins(
thisPtr,
FfiConverterTypeAddress.lower(`owner`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`),FfiConverterOptionalString.lower(`coinType`),
FfiConverterTypeAddress.lower(`owner`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`),FfiConverterOptionalTypeStructTag.lower(`coinType`),
)
},
{ future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) },
Expand Down Expand Up @@ -20370,6 +20382,30 @@ open class GraphQlClient: Disposable, AutoCloseable, GraphQlClientInterface
}


/**
* Get the list of gas coins for the specified address.
*/
@Throws(SdkFfiException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
override suspend fun `gasCoins`(`owner`: Address, `paginationFilter`: PaginationFilter?) : CoinPage {
return uniffiRustCallAsync(
callWithPointer { thisPtr ->
UniffiLib.INSTANCE.uniffi_iota_sdk_ffi_fn_method_graphqlclient_gas_coins(
thisPtr,
FfiConverterTypeAddress.lower(`owner`),FfiConverterOptionalTypePaginationFilter.lower(`paginationFilter`),
)
},
{ future, callback, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) },
{ future, continuation -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) },
{ future -> UniffiLib.INSTANCE.ffi_iota_sdk_ffi_rust_future_free_rust_buffer(future) },
// lift function
{ FfiConverterTypeCoinPage.lift(it) },
// Error FFI converter
SdkFfiException.ErrorHandler,
)
}


/**
* Get the default name pointing to this address, if one exists.
*/
Expand Down
Loading