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 symbolSdk from "/path/to/symbolsdk/javascript/src/index.js"; | |
const facade = new symbolSdk.facade.SymbolFacade("testnet"); | |
type PrivateKey = InstanceType<typeof symbolSdk.PrivateKey>; | |
const privateKey: PrivateKey = symbolSdk.PrivateKey.random(); | |
/* | |
const privateKey: PrivateKey = new symbolSdk.PrivateKey( | |
"677035391CD3701293D385F037BA32796252BB7CE180B00B582DD9B20AAAD7F0" | |
); |
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 csv | |
import datetime | |
from pathlib import Path | |
def tohex(entry): | |
return f'#{entry[0]:02x}{entry[1]:02x}{entry[2]:02x}' | |
def short(hash): | |
return f'{hash[0:6]}…{hash[-6:]}' |
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 argparse | |
from pathlib import Path | |
import time | |
import tqdm | |
from symbolchain.CryptoTypes import Hash256, Signature | |
from symbolchain.facade.SymbolFacade import SymbolFacade | |
from symbolchain.sc import BlockFactory, Height, TransactionType | |
from symbolchain.symbol.Merkle import MerkleHashBuilder |
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 zmq | |
from binascii import hexlify as h, unhexlify as u | |
from symbolchain.facade.SymbolFacade import SymbolFacade | |
from symbolchain.CryptoTypes import Hash256 | |
from symbolchain.sc import BlockFactory | |
context = zmq.Context() | |
# Socket to talk to server |
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
# This is slightly altered send.py sample for SAI testnet (sainet) | |
import requests | |
import time | |
from binascii import hexlify | |
from datetime import datetime, timezone | |
from symbolchain.CryptoTypes import Hash256, PrivateKey | |
from symbolchain.facade.SymbolFacade import SymbolFacade | |
from symbolchain.sc import Amount, Timestamp |
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 requests # imported to get last block time | |
from symbolchain.symbol.IdGenerator import generate_mosaic_alias_id | |
from symbolchain.facade.SymbolFacade import SymbolFacade | |
from symbolchain.sc import Amount, Timestamp | |
facade = SymbolFacade('mainnet') | |
# create inner transaction | |
amount = 1 |
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
apt-get update && apt-get install -y python3 python3-pip git | |
git clone -b dev https://github.com/symbol/symbol.git | |
cd symbol/sdk/python | |
./scripts/ci/setup_build.sh | |
python3 -m pip install -r requirements.txt | |
# generate catbuffer models and test vectors | |
./scripts/ci/build.sh |
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
{ | |
"raw": "0000FFFF763A6AEEFA302B9B2391BE10AAA0386788181D4138103CE12D5DF264E7E545EDA61745DFB609DCC1CD2A0EC84FAA62635D69CF048802CA0309E1B34C31A74C8BA45431DF44F29D3E1BC59E8ED853827B9769743B91B689862743D81A6C312559DF20A95089B570CF8F891144371145786C16E47C79374DAFEAD3B069D5ABCC5B4CFD6522E76510AC08FBA0228F06E4CF50B3C991F4A96A47DA86B258DC1A983533B65F4E383AAC8032F342F713E89CBCA718DD4460324B121316FA529031DF295294E73FDFA86C1C80D0F6955FE1DB3468DB6088156E2B444CAC43DADF85261571C1E55CEE9CF639FFDB88E4044198420B4C0262C7DC03E4DE7774355BAB505D06A156D8FA19757EAEFED25DB6D01D66551B77CA2437E412D82E930A5B9DB94CE72E3041530287551F54D6CCF4407B7150A202438A38ED7C2FD36C60451C8EFCDD9BAE15684B1A180F12B97EBBE50232C29F6A7A394F9703A4F88122EDBE60D44D3C5B63A4820BBEEC3E1607F81B77CEF1BB7997120D55D74CF876CB65F9D08B561312591E65725F6339DEAFB0CC28A82C4DC7E2CE415DF3D9B1146F2A60315BCCC59F9BFAB6F941FFEBDF79C5B36B45A8686C1C9912B651A065A8EBEF6E5F1BE180076226A149F60E55DC10F48FBC0D628BF7CBD6FD0B1A46858AE8A4FDC1061DC8A9761C26572DDB93A75E1A0A29CEC788AFC16CC90 |
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
" Vim syntax file | |
" Language: Catapult server log files | |
" Maintainer: gimre | |
" Latest Revision: 2020-12-10 | |
" Changes: 2020-12-10 Initial version | |
" Based on messages.vim - syntax file for highlighting kernel messages | |
if exists("b:current_syntax") | |
finish |
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
local utils = require('utils') | |
local c = catapult | |
local function generateRandomAccounts(num) | |
local accounts = {} | |
local generator = c.rng.HighEntropySource:new() | |
for i = 1, num do | |
table.insert(accounts, c.crypto.KeyPair.fromGenerator(generator)) | |
end |
NewerOlder