Comments (3)
@Jaguar0625 can we close this one and #298 ?
from symbol.
part of js sdk 3.0.4
from symbol.
Works correctly. I'm able to calculate xor using util ✔️ :
const textEncoder = new TextEncoder();
const old_value = textEncoder.encode('some value')
const new_value = textEncoder.encode('some new value')
const value_delta = symbolSDK.symbol.metadataUpdateValue(old_value, new_value)
const metadata = facade.transactionFactory.createEmbedded({
type: 'account_metadata_transaction_v1',
signerPublicKey: keyPair.publicKey,
targetAddress: facade.network.publicKeyToAddress(keyPair.publicKey),
scopedMetadataKey: 4n,
value: value_delta,
valueSizeDelta: new_value.length - old_value.length
})
const embedded_transactions = [metadata]
const merkleHash = SymbolFacade.hashEmbeddedTransactions(embedded_transactions)
const aggregateTransaction = facade.transactionFactory.create({
type: 'aggregate_complete_transaction_v2',
signerPublicKey: keyPair.publicKey,
fee: 100000n,
deadline: BigInt(timestamp + 3600n * 1000n), // 3600sec * 1000ms
transactionsHash: merkleHash,
transactions: embedded_transactions
})
from symbol.
Related Issues (20)
- [sdk/python] Metadata - provide util to calculate delta (xor) value and delta length HOT 2
- [sdk/javascript] Generate and publish documentation from source code
- [sdk/python] Generate and publish documentation from source code
- [catbuffer/parser] Parsing hash_lock.cat does not output data for factory_type: Transaction. HOT 5
- [client/catapult] Testnet node stopped syncing from block 588857 HOT 2
- [monorepo] Do you have an easy example for deploying an api server in Kubernetes? HOT 5
- [client/catapult] can't graceful shutdown broker HOT 3
- [client/catapult] Version and tag. HOT 1
- [client/catapult] Missing resolved address information when sending > 1 transaction to same address alias in one block HOT 6
- [client/rest] Exclude treasure/ecosystem addresses from circulating supply HOT 2
- [sdk/javascript] Having problem to create Nem multisig_transaction_v1 HOT 3
- [sdk/javascript] The Nem multisig_transaction_v2 is missing in the SDK. HOT 1
- [sdk/python] The Nem multisig_transaction_v2 is missing in the SDK. HOT 3
- [sdk/python] Having problem to create Nem multisig_transaction_v1 HOT 2
- [client/rest] New inflation endpoints dosen't work HOT 1
- [client/catapult] HappyBlockchainIntegrityTests hangs
- [client/rest] upgrade mongodb nodejs driver to 5.x HOT 3
- [sdk/javascript] how to create an account using the new sdk HOT 1
- [client/catapult] Conan repository URL seems broken HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from symbol.