Comments (6)
You need to pass an EOSKey as creator_privkey
See lines 35/36
https://github.com/eosnewyork/eospy/blob/master/examples/push_transaction.py#L35
from eospy.
the eospy library already supports multisig account creation. If you look at this part at the newaccount you could modify this part to add two keys to the owner key. It would look something like:
owner_auth = {
"threshold": 1,
"keys": [{
"key": "EOSxxxxxxxxxxxxxxx1",
"weight": 1
},{
"key": "EOSxxxxxxxxxxxxxxx1",
"weight": 1
}],
"accounts": [],
"waits": []
}
The same could be done for the active key.
To answer your two questions I would run:
cleos create key -f <some_file_name>
chmod 600 <some_file_name>
Then I would use the parse_key_file to extract the private key in your python file and pass that to the push_transaction function. I am working on adding support for other signing methods but it is currently low on the priority list.
from eospy.
Thanks, @deckb for your response. I used the cleos create key -f <some_file_name>
and generated private and public key now when I tried to create an account using these keys it throws following error
raise EOSKeyError('Must pass a class that extends the eospy.Signer class')
eospy.exceptions.EOSKeyError: Must pass a class that extends the eospy.Signer class
and here is my create account code.
ce = cleos.Cleos(url=settings.BLOCKCHAIN_URL)
key1 = generate_keys()
key2 = generate_keys()
print(key1)
print(key2)
ca = ce.create_account(creator=settings.CREATOR,
creator_privkey=settings.CREATOR_PRIVATE_KEY,
acct_name=account_name,
owner_key=key1['public_key'],
active_key=key2['public_key'],
stake_net='1.0000 EOS', stake_cpu='1.0000 EOS', ramkb=8, permission='active',
transfer=False, broadcast=True
)
Can you tell me where am I doing wrong?
Thanks
from eospy.
Thanks, @deckb, it was a really great help, actually, I am trying to set multisig permission, before I was using following cleos command to set the permission:
For active
cleos --url https://api-kylin.eosasia.one:443 set account permission mymultisig14 active '{"threshold":2,"keys":[],"accounts":[{"permission":{"actor":"mcttoken1233","permission":"active"},"weight":1},{"permission":{"actor":"mcttoken1234","permission":"active"},"weight":1},{"permission":{"actor":"mcttoken1235","permission":"active"},"weight":1}],"waits":[]}' owner -p mymultisig14@owner
For owner
cleos --url https://api-kylin.eosasia.one:443 set account permission mymultisig14 owner '{"threshold":2,"keys":[],"accounts":[{"permission":{"actor":"mcttoken1233","permission":"owner"},"weight":1},{"permission":{"actor":"mcttoken1234","permission":"owner"},"weight":1},{"permission":{"actor":"mcttoken1235","permission":"owner"},"weight":1}],"waits":[]}' -p mymultisig14@owner
I am not able to set multisig permission, I tried your previous suggestions still no luck.
Thanks
from eospy.
I guess I was confused by what you were originally asking. What error message are you seeing when you run those commands?
from eospy.
Closed with no response
from eospy.
Related Issues (20)
- Do you have security problems using abi_json_to_bin in your code? HOT 4
- Internal Service Error, unsatisfied_authorization HOT 2
- "ImportError: cannot import name ABC" HOT 1
- Set Contract HOT 2
- Deserialize a packed trx offline HOT 5
- Can you please publish [email protected] to pypi? HOT 1
- What are the potential risks using eospy EOSKey for mainnet? HOT 1
- long sign time and eosjs verify HOT 20
- what function is equal to eosjs-ecc's ecc.sign or ecc.signHash HOT 1
- create other eosin.token example HOT 1
- AttributeError in example/push_transaction HOT 6
- Can't sign transaction with key.sign(digest)
- 3.6.5 int/float issue HOT 1
- set_code and set_abi do not work HOT 1
- HTTPConnectionPool(host='api.pennstation.eosnewyork.io', port=7001): Max retries exceeded with url: /v1/chain/abi_json_to_bin (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x75c91050>: Failed to establish a new connection: [Errno 111] Connection refused' HOT 2
- Missing changelog HOT 2
- Get children account list HOT 1
- Getting InvalidKeyFile Error HOT 2
- ImportError: cannot import name 'InvalidKeyFile' from 'eospy.exceptions' HOT 1
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 eospy.