-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
628 additions
and
620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2020-2025 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
export * as move_calls from './move_calls'; | ||
export * as move_calls from "./move_calls"; |
38 changes: 19 additions & 19 deletions
38
bindings/wasm/iota_interaction_ts/lib/move_calls/asset/create.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
// Copyright 2020-2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { Transaction, TransactionArgument } from "@iota/iota-sdk/transactions" | ||
import { Transaction, TransactionArgument } from "@iota/iota-sdk/transactions"; | ||
|
||
export function new_( | ||
inner_bytes: Uint8Array, | ||
inner_type: string, | ||
mutable: boolean, | ||
transferable: boolean, | ||
deletable: boolean, | ||
packageId: string, | ||
inner_bytes: Uint8Array, | ||
inner_type: string, | ||
mutable: boolean, | ||
transferable: boolean, | ||
deletable: boolean, | ||
packageId: string, | ||
): Promise<Uint8Array> { | ||
const tx = new Transaction(); | ||
const inner_arg = tx.pure(inner_bytes) | ||
const mutable_arg = tx.pure.bool(mutable); | ||
const transferable_arg = tx.pure.bool(transferable); | ||
const deletable_arg = tx.pure.bool(deletable); | ||
const tx = new Transaction(); | ||
const inner_arg = tx.pure(inner_bytes); | ||
const mutable_arg = tx.pure.bool(mutable); | ||
const transferable_arg = tx.pure.bool(transferable); | ||
const deletable_arg = tx.pure.bool(deletable); | ||
|
||
tx.moveCall({ | ||
target: `${packageId}::asset::new_with_config`, | ||
typeArguments: [inner_type], | ||
arguments: [inner_arg, mutable_arg, transferable_arg, deletable_arg] | ||
}); | ||
tx.moveCall({ | ||
target: `${packageId}::asset::new_with_config`, | ||
typeArguments: [inner_type], | ||
arguments: [inner_arg, mutable_arg, transferable_arg, deletable_arg], | ||
}); | ||
|
||
return tx.build(); | ||
} | ||
return tx.build(); | ||
} |
25 changes: 12 additions & 13 deletions
25
bindings/wasm/iota_interaction_ts/lib/move_calls/asset/delete.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
// Copyright 2020-2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { ObjectRef, Transaction, TransactionArgument } from "@iota/iota-sdk/transactions" | ||
import { ObjectRef, Transaction, TransactionArgument } from "@iota/iota-sdk/transactions"; | ||
|
||
export function delete_( | ||
asset: ObjectRef, | ||
asset_type: string, | ||
packageId: string, | ||
asset: ObjectRef, | ||
asset_type: string, | ||
packageId: string, | ||
): Promise<Uint8Array> { | ||
const tx = new Transaction(); | ||
const asset_arg = tx.objectRef(asset); | ||
const tx = new Transaction(); | ||
const asset_arg = tx.objectRef(asset); | ||
|
||
tx.moveCall({ | ||
target: `${packageId}::asset::delete`, | ||
typeArguments: [asset_type], | ||
arguments: [asset_arg] | ||
}); | ||
tx.moveCall({ | ||
target: `${packageId}::asset::delete`, | ||
typeArguments: [asset_type], | ||
arguments: [asset_arg], | ||
}); | ||
|
||
return tx.build(); | ||
return tx.build(); | ||
} | ||
|
8 changes: 4 additions & 4 deletions
8
bindings/wasm/iota_interaction_ts/lib/move_calls/asset/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Copyright 2020-2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
export * from './create'; | ||
export * from './update'; | ||
export * from './delete'; | ||
export * from './transfer'; | ||
export * from "./create"; | ||
export * from "./delete"; | ||
export * from "./transfer"; | ||
export * from "./update"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 14 additions & 14 deletions
28
bindings/wasm/iota_interaction_ts/lib/move_calls/asset/update.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
// Copyright 2020-2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { ObjectRef, Transaction } from "@iota/iota-sdk/transactions" | ||
import { ObjectRef, Transaction } from "@iota/iota-sdk/transactions"; | ||
|
||
export function update( | ||
asset: ObjectRef, | ||
content: Uint8Array, | ||
content_type: string, | ||
packageId: string, | ||
asset: ObjectRef, | ||
content: Uint8Array, | ||
content_type: string, | ||
packageId: string, | ||
): Promise<Uint8Array> { | ||
const tx = new Transaction(); | ||
const content_arg = tx.pure(content); | ||
const asset_arg = tx.objectRef(asset); | ||
const tx = new Transaction(); | ||
const content_arg = tx.pure(content); | ||
const asset_arg = tx.objectRef(asset); | ||
|
||
tx.moveCall({ | ||
target: `${packageId}::asset::update`, | ||
typeArguments: [content_type], | ||
arguments: [asset_arg, content_arg] | ||
}); | ||
tx.moveCall({ | ||
target: `${packageId}::asset::update`, | ||
typeArguments: [content_type], | ||
arguments: [asset_arg, content_arg], | ||
}); | ||
|
||
return tx.build(); | ||
return tx.build(); | ||
} |
Oops, something went wrong.