今までの挙動 | 新しい挙動 | |
---|---|---|
モザイク名 | ネームスペース + 自身の名前 | ネームスペースのエイリアス |
ID | ネームスペース + 自身の名前 | ナンスから生成される |
有効期限 | 作成時にセットされる | 永続か有効期限をセットする |
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
const { SymbolFacade } = require('symbol-sdk').facade; | |
const { PrivateKey } = require('symbol-sdk/src/CryptoTypes'); | |
const { KeyPair } = require('symbol-sdk/src/symbol/KeyPair'); | |
const { Signature } = require('symbol-sdk/src/symbol/models'); | |
const axios = require('axios').default; | |
const wsl = require('ws'); | |
async function main() { | |
const facade = new SymbolFacade('testnet'); |
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
import { Account, AggregateTransaction, Deadline, MosaicDefinitionTransaction, MosaicFlags, MosaicId, MosaicNonce, MosaicSupplyChangeAction, MosaicSupplyChangeTransaction, NetworkType, RepositoryFactoryHttp, TransactionService, UInt64 } from 'symbol-sdk'; | |
async function main() { | |
const node = 'https://sym-test-01.opening-line.jp:3001'; | |
const repoFactory = new RepositoryFactoryHttp(node); | |
const pk = '__INPUT_YOUR_PRIVATE_KEY__'; | |
try { | |
const networkType = await repoFactory.getNetworkType().toPromise(); | |
const generationHash = await repoFactory.getGenerationHash().toPromise(); | |
const epochAdjustment = await repoFactory.getEpochAdjustment().toPromise(); |
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
import { ExtendedKey, MnemonicPassPhrase, Network, Wallet } from "symbol-hd-wallets"; | |
import { MnemonicQR } from "symbol-qr-library"; | |
import { Account, NetworkType } from "symbol-sdk"; | |
const words = 'INPUT YOUR MNEMONIC WORDS'; | |
const mnemonic = new MnemonicPassPhrase(words); | |
const testnetGenerationHash = '3B5E1FA6445653C971A50687E75E6D09FB30481055E3990C84B25E9222DC1155'; | |
const mainnetGenerationHash = '57F7DA205008026C776CB6AED843393F04CD458E0AA2D9F1D5F31A402072B2D6'; | |
const generationhash = mainnetGenerationHash; |
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
import { Account, Deadline, LinkAction, NetworkType, RepositoryFactoryHttp, TransactionService, VotingKeyLinkTransaction } from 'symbol-sdk'; | |
const apiGatewayUrl = 'http://api-01.ap-northeast-1.testnet.symboldev.network:3000'; | |
const networkType = NetworkType.TEST_NET; | |
const generationHash = '45FBCF2F0EA36EFA7923C9BC923D6503169651F7FA4EFC46A8EAF5AE09057EBD'; | |
const epochAdjustment = 1573430400; | |
const repoFactory = new RepositoryFactoryHttp(apiGatewayUrl, { | |
networkType, | |
generationHash |
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
import { NetworkType, RepositoryFactoryHttp } from 'symbol-sdk'; | |
const apiEndpoint = 'https://sym-test963.opening-line.jp:3001'; | |
const wsEndpoint = `${apiEndpoint.replace('http', 'ws')}/ws` | |
const networkType = NetworkType.TEST_NET; | |
const generationHash = '1DFB2FAA9E7F054168B0C5FCB84F4DEB62CC2B4D317D861F3168D161F54EA78B'; | |
const repositoryFactory = new RepositoryFactoryHttp(apiEndpoint, { | |
networkType: networkType, | |
generationHash: generationHash, |
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
import * as dotenv from 'dotenv'; | |
import { MosaicHttp, Account, NetworkType, MosaicService, AccountHttp } from 'nem2-sdk'; | |
import { mergeMap } from 'rxjs/operators'; | |
dotenv.config(); | |
const endpoint = process.env.API_ENDPOINT; | |
const accountHttp = new AccountHttp(endpoint); | |
const mosaicHttp = new MosaicHttp(endpoint); | |
const mosaicService = new MosaicService(accountHttp, mosaicHttp); |
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
import { Listener, Account, NetworkType, PublicAccount, TransferTransaction, Deadline, PlainMessage, NetworkCurrencyMosaic, AggregateTransaction, HashLockTransaction, UInt64, TransactionHttp } from 'nem2-sdk'; | |
import { filter, mergeMap } from 'rxjs/operators'; | |
const nodeUrl = 'https://catapult-test.opening-line.jp:3001'; | |
const transactionHttp = new TransactionHttp(nodeUrl); | |
const listener = new Listener(nodeUrl); | |
const aPrivateKey = 'Account_A_Private_Key'; | |
const aAccount = Account.createFromPrivateKey(aPrivateKey, NetworkType.MIJIN_TEST); |
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
import { MnemonicPassPhrase, ExtendedKey, Network, Wallet } from 'nem2-hd-wallets'; | |
const mnemonic = MnemonicPassPhrase.createRandom(); | |
console.log(mnemonic); | |
const bip32seed = mnemonic.toEntropy(); | |
console.log(`seed: ${bip32seed}`); | |
const xKey = ExtendedKey.createFromSeed(bip32seed); | |
console.log(`xkey: ${xKey.toBase58()}`); | |
const wallet = new Wallet(xKey); |
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
import { Account, NetworkType, TransactionHttp, AddressAliasTransaction, Deadline, AliasType, UInt64, NamespaceId, Address, AliasActionType } from "nem2-sdk"; | |
const privateKey = 'YOUR_PRIVATE_KEY'; | |
const account = Account.createFromPrivateKey(privateKey, NetworkType.MIJIN_TEST); | |
const apiServer = 'http://localhost:3000/'; | |
const transactionHttp = new TransactionHttp(apiServer); | |
const namespaceId = new NamespaceId([1937548940, 3993951157]); | |
const linkAddress = Address.createFromRawAddress('SACVJB7HYIJMFMPI4IYN2XJHAN66D7VHMPLUL6ZP'); |
NewerOlder