Skip to content

Commit b3a03c5

Browse files
committed
upgrade to 2.0.0
1 parent 71726ae commit b3a03c5

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
__pycache__
2-
.idea/
2+
.idea/
3+
build/
4+
dist/
5+
pyweidentity.egg-info/

pyweidentity/weidentityClient.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
LOG = logging.getLogger(__name__)
66

77
class weidentityClient(Base):
8-
def __init__(self, host, port=None, version="1.0.0"):
8+
def __init__(self, host, port=None, version="2.0.0"):
99
super(weidentityClient, self).__init__(host, port, version)
1010

1111
def create_weidentity_did_first(self, publicKey, nonce):
12-
# 创建WeIdentity DID
12+
# First Create WeIdentity DID
1313
data_dict = {
1414
"functionArg": {
1515
"publicKey": publicKey
@@ -23,7 +23,7 @@ def create_weidentity_did_first(self, publicKey, nonce):
2323
return self.post("/weid/api/encode", data=data_dict)
2424

2525
def create_weidentity_did_second(self, nonce, data, signedMessage, blockLimit, signType="1"):
26-
# 创建WeIdentity DID
26+
# Second Create WeIdentity DID
2727
data_dict = {
2828
"functionArg": {},
2929
"transactionArg": {
@@ -38,7 +38,7 @@ def create_weidentity_did_second(self, nonce, data, signedMessage, blockLimit, s
3838
}
3939
return self.post("/weid/api/transact", data=data_dict)
4040

41-
def create_weidentity_did(self, privKey, nonce, signType="1"):
41+
def create_weidentity_did(self, privKey, nonce=1, signType="1"):
4242
publicKey = self.priv_to_public(privKey)
4343
respBody = self.create_weidentity_did_first(publicKey, nonce)
4444
encode_transaction = respBody['respBody']['encodedTransaction']
@@ -83,7 +83,7 @@ def register_authority_issuer_second(self, nonce, data, signedMessage, blockLimi
8383
}
8484
return self.post("/weid/api/transact", data=data_dict)
8585

86-
def register_authority_issuer(self, privKey, name, weId, nonce, signType="1"):
86+
def register_authority_issuer(self, privKey, name, weId, nonce=1, signType="1"):
8787

8888
respBody = self.register_authority_issuer_first(name, weId, nonce)
8989

@@ -131,7 +131,7 @@ def create_cpt_second(self, nonce, data, signedMessage, blockLimit, signType="1"
131131
}
132132
return self.post("/weid/api/transact", data=data_dict)
133133

134-
def create_cpt(self, privKey, weId, cptJsonSchema, cptSignature, nonce, signType="1"):
134+
def create_cpt(self, privKey, weId, cptJsonSchema, cptSignature, nonce=1, signType="1"):
135135

136136
respBody = self.create_cpt_first(weId, cptJsonSchema, cptSignature, nonce)
137137

pyweidentity/weidentityService.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
LOG = logging.getLogger(__name__)
77

88
class weidentityService(Base):
9-
def __init__(self, host, port=None, version="1.0.0"):
9+
def __init__(self, host, port=None, version="2.0.0"):
1010
super(weidentityService, self).__init__(host, port, version)
1111

1212
def create_weidentity_did(self, function_arg={}, transaction_arg={}):

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
setup(
77
name='pyweidentity',
8-
version='1.1',
8+
version='2.0.0',
99
author="99Kies",
1010
author_email='[email protected]',
11-
url="https://github.com/SUIBE-Blockchain/Weidentity-Python-SDK",
11+
url="https://github.com/99Kies/Weidentity-Python-SDK",
1212
packages=find_packages(),
1313
long_description=long_description,
1414
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)