Comments (2)
part of js sdk 3.0.4
from symbol.
I've tested JS SDK on the current dev branch, and SDK users don't need any more fill:
messageEnvelopeSize
when sensing transfer transactionlevySize
when sending mosaic definition transaction
I've not noticed any issues 👍
Example tx construction for transfer transaction:
const transferTransaction = facade.transactionFactory.create({
type: 'transfer_transaction_v1',
fee: BigInt(100000),
signerPublicKey: keyPair.publicKey,
recipientAddress: 'TAZLVBLIBA72UDZKY2N6PEW7SPQHHYOWIT4PRRNP',
timestamp: Number(Math.ceil(timestamp / 1000)),
deadline: Number(Math.ceil(timestamp / 1000 + 60 * 60)),
amount: BigInt(1000000),
message: {
messageType: 'plain',
message: 'Good Luck!'
}
});
Example ex construction for mosaic creation with levy:
const transferTransaction = facade.transactionFactory.create({
type: 'mosaic_definition_transaction_v1',
fee: 200000n,
signerPublicKey: keyPair.publicKey,
timestamp: Number(Math.ceil(timestamp / 1000)),
deadline: Number(Math.ceil(timestamp / 1000 + 60 * 60)),
rentalFee: 10000000n,
rentalFeeSink: 'TBMOSAICOD4F54EE5CDMR23CCBGOAM2XSJBR5OLC',
mosaicDefinition: {
ownerPublicKey: keyPair.publicKey,
id: {
namespaceId: {
name: textEncoder.encode('supernamespace')
},
name: textEncoder.encode('awesome_mosaic5')
},
description: textEncoder.encode('Just testing'),
properties: [
{ property: { name: textEncoder.encode('divisibility'), value: textEncoder.encode('0') } },
{ property: { name: textEncoder.encode('initialSupply'), value: textEncoder.encode('1000') } },
{ property: { name: textEncoder.encode('supplyMutable'), value: textEncoder.encode('true') } },
{ property: { name: textEncoder.encode('transferable'), value: textEncoder.encode('true') } }
],
levy: {
transferFeeType: 'absolute',
recipientAddress: address,
mosaicId: { namespaceId: { name: textEncoder.encode('nem') }, name: textEncoder.encode('xem') },
fee: 632_0000n
}
}
});
from symbol.
Related Issues (20)
- [sdk/javascript] Metadata - provide util to calculate delta (xor) value and delta length HOT 3
- [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.