commercionetwork / commercio-sdk.dart Goto Github PK
View Code? Open in Web Editor NEWThe official Commercio.network SDK made in pure Dart
Home Page: https://dart.sdk.docs.commercio.network
License: MIT License
The official Commercio.network SDK made in pure Dart
Home Page: https://dart.sdk.docs.commercio.network
License: MIT License
does anyone have any example code for signing pdf PAdES?
For what I can't understand ...
Do i have to have my public key for signing (taken from smart card or usb token or any other certification body)?
Must the signature, in .pem format, be completed with all the authorities that issued the certificate? how can I do ? is there simply a structure for the pem file?
In the notes, I see that in the end I have to combine my .pem file with my public signature taken from my wallet? it's right ?
I can not understand, on the examples of Kotlin I have some instructions that I do not find in the examples in dart.
Update documentation to reflect SDK changes
Reviewing the documentation I've found just some small adjustment that should be done:
diDocument
instead of didDocument
), should be:
await IdHelper.setDidDocument(didDocument, wallet);
:::tip Some tip :::
static Future<TransactionResult> inviteUser(
String userDid,
Wallet wallet,
{StdFee fee}
) async
fee
parameter.static Future<TransactionResult> openCdp(
int amount,
Wallet wallet,
{StdFee fee}
)
amount
instead of commercioTokenAmount
.fee
parameter is now assigned inside the method body and thus the signature become:
static Future<TransactionResult> createSignAndSendTx(
List<StdMsg> msgs,
Wallet wallet, {
StdFee fee,
}) async
signSorted()
should have the signature:
static Uint8List signSorted(dynamic data, Wallet wallet)
static Future<RSAPublicKey> getGovernmentRsaPubKey(String lcdUrl) async
RSAPublicKey
instead of RSAPubKey
. static Future<KeyPair<RSAPublicKey, RSAPrivateKey>> generateRsaKeyPair({
int bytes = 2048,
String type,
}) async
type
parameter. static Future<Key> generateAesKey({int length = 256}) async
256
instead of 356
.ShareDoocument transaction with a sha256 digest as checksum value is not allowed although chain accepts that.
Add MsgDepositIntoLiquidityPool
function to meet the new specifications.
Adapting the Docs module to the new version of the chain:
The 'requestDidPowerUp' function of the 'IdHelper' class must be updated to meet the new specifications.
The 'shareDocument ' function of the 'DocsHelper' class must be updated to meet the new specifications.
I.E.: add do_sign
optional element
Adapting the Id module to the new version of the chain:
The 'setDidDocument' function of the 'IdHelper' class must be updated to meet the new specifications.
parseKeyFromPem
from RSAKeyParser
to KeysHelper
class, then remove RSAKeyParser
class.generateRandomNonceUtf8
method of class EncryptionHelper
is actually useful or if it can be replaced by an existing method and then removed.Adapting the CommercioMint module to the new version of the chain:
Add the ability to set the mode a transaction is sent
The class DocsHelper
currently supports a custom list of fees only in the method shareDocument()
. Because the SDK is built to support different types of StdCoin
also the other methods should take a fee
parameter. For retro compatibility the new parameter should be optional with a default value.
List of methods that should be updated:
DocsHelper.sendDocumentReceipt()
MembershipHelper.inviteUser()
MembershipHelper.buyMembership()
MintHelper.openCdp()
MsgOpenCdp()
should also be updated with the custom fee listMintHelper.closeCdp()
IdHelper.setDidDocument()
IdHelper.requestDidPowerUp()
IdHelper.MsgRequestDidPowerUp()
The optional parameter should be like those examples:
amount
is required:
fun({List<StdCoin> amount = const [StdCoin(denom: "ucommercio", amount: 10000)]})
fee
is required:
fun({StdFee fee = const StdFee(
gas: "200000",
amount: [StdCoin(denom: "ucommercio", amount: 10000)]
)})
The changes also needs to be reflected on the documentation and the examples.
Remove the requestDidDeposit functions and any connected functions that you do not need.
Take care to read the tumbler address issue carefully.
In the 'TxHelper' class the current amount of fees (100) will not be enough to successfully complete a transaction (required 10000).
Current code:
StdFee fee = const StdFee(
gas: "200000",
amount: [const StdCoin(denom: "ucommercio", amount: "100")]),
membership
with commerciokyc
module.Check that the documentation is aligned with the current code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.