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
console.log("Hello, NEMber"); | |
// Configure a Blockchain endpoint and include SDK | |
var NEM_HOST = "http://bob.nem.ninja"; // bob is Testnet! | |
var NEM_PORT = 7890; | |
var nem = require("nem-sdk").default; | |
var node = nem.model.objects.create("endpoint")(NEM_HOST, NEM_PORT); | |
// Issue the Mosaics request for the given Account (insert Player XEM address here) | |
nem.com.requests.account.mosaics(node, "TCTIMURL5LPKNJYF3OB3ACQVAXO3GK5IU2BJMPSU") |
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
console.log("Hello, NEMber"); | |
// Configure a Blockchain endpoint and include SDK | |
var NEM_HOST = "http://bob.nem.ninja"; // bob is Testnet! | |
var NEM_PORT = 7890; | |
var nem = require("nem-sdk").default; | |
var node = nem.model.objects.create("endpoint")(NEM_HOST, NEM_PORT); | |
// Read Outgoing Transactions for the given game/application Account (pacnem-business) | |
nem.com.requests.account.outgoingTransactions(node, "TCTIMURL5LPKNJYF3OB3ACQVAXO3GK5IU2BJMPSU") |
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
console.log("Hello, NEMber"); | |
// Configure a Blockchain endpoint and include SDK | |
var NEM_HOST = "http://bob.nem.ninja"; // bob is Testnet! | |
var NEM_PORT = 7890; | |
var nem = require("nem-sdk").default; | |
var node = nem.model.objects.create("endpoint")(NEM_HOST, NEM_PORT); | |
// Define the player data | |
var playerXEM = "TATKHV5JJTQXCUCXPXH2WPHLAYE73REUMGDOZKUW"; |
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
// include the NEM-sdk package in your package.json first. | |
// nem-sdk: npmjs.com/package/nem-sdk | |
let nem_ = require("nem-sdk").default; | |
let connectedNode = nem_.model.objects.create("endpoint")("http://bigalice2.nem.ninja", "7890"); | |
nem_.com.requests.chain.lastBlock(connectedNode) | |
.then(function(err, block) | |
{ | |
if (! err && block) { |
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
/** | |
* Class OutgoingTransactionStream can be used to read | |
* outgoing transactions of a given NEM Account. | |
* | |
* This class is kept quite simple and only defines a | |
* function to read *all* outgoing transactions of an | |
* account. | |
* | |
* @param {Object} sdk use `require('nem-sdk').default` | |
* @param {Object} endpoint |
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
// nem-sdk: npmjs.com/package/nem-sdk | |
// class OutgoingTransactionStream from gist: https://gist.github.com/evias/aea14ff6bea618239ca21a7f3802773e.js | |
let sdk = require("nem-sdk").default; | |
/** | |
* The Transaction class defines some utilities methods to keep | |
* reading data from NEM Transactions organized a little bit. | |
* | |
* @param {Object} transactionMetaDataPair Transaction object received in NIS response |
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
let endpoint = { | |
'host': 'http://bigalice2.nem.ninja', | |
'port': 7890 | |
}; | |
let networkId = -104; | |
let privateKeyOfAccountToConvert = "PRIV_KEY_HEX_ACCOUNT_TO_CONVERT"; | |
let privateKeyOfCosig = "PRIV_KEY_HEX_ACCOUNT_SINGLE_COSIG"; | |
let kpc = sdk.crypto.keyPair.create(privateKeyOfAccountToConvert); |
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
{ | |
"require": { | |
"php": ">=5.5.9", | |
"evias/nem-php": "dev-master", | |
"kornrunner/keccak": "@dev" | |
}, | |
"require-dev": { | |
}, | |
"autoload": { | |
"classmap": [ |
This file has been truncated, but you can view the full file.
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
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
'use strict'; | |
var _helpers = require('../../utils/helpers'); | |
var _helpers2 = _interopRequireDefault(_helpers); | |
var _headers = require('./headers'); | |
var _headers2 = _interopRequireDefault(_headers); |
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
<?php | |
use NEM\API; | |
use NEM\Models\MosaicAttachments; | |
use NEM\Models\MosaicAttachment; | |
use NEM\Models\Mosaic; | |
use NEM\Models\Transaction\Transfer; | |
use NEM\Infrastructure\Transaction as TransactionService; | |
// prepare the transaction |
OlderNewer