File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @evolution-sdk/evolution " : patch
3+ ---
4+
5+ Add ` attachMetadata() ` operation to TransactionBuilder for attaching transaction metadata according to CIP-10 standard.
6+
7+ ** Changes:**
8+ - Added ` attachMetadata() ` method to attach metadata with custom labels
9+ - Metadata labels are now bigint (unbounded positive integers) supporting CIP-20 messages (label 674) and custom labels
10+ - Automatic computation of auxiliaryDataHash in transaction body when metadata is present
11+ - Proper fee calculation accounting for auxiliary data size
12+ - TransactionMetadatum refactored to simple union type: ` string | bigint | Uint8Array | Map | Array `
13+ - Added ` NonNegativeInteger ` schema to Numeric module for unbounded non-negative integers
14+
15+ ** Example:**
16+ ``` typescript
17+ await client
18+ .newTx ()
19+ .attachMetadata ({
20+ label: 674n , // CIP-20 message label
21+ metadata: " Hello Cardano!"
22+ })
23+ .payToAddress ({ address , assets })
24+ .build ()
25+ .then (tx => tx .sign ().submit ())
26+ ```
You can’t perform that action at this time.
0 commit comments