Closed bartekn closed 6 years ago
@bartekn I assume this also is a ref to #6
@bartekn I assume this also is a ref to #6
@robertDurst #6 is more about primitives like unsigned char
, char
, etc. When I mention type
in this PR I mean types defined by users in XDR schemas like:
struct DecoratedSignature
{
SignatureHint hint; // last 4 bytes of the public key, used as a hint
Signature signature; // actual signature
};
Currently
config
function adds new types to the globaltypes
map and it makesjs-xdr
impossible to use with different XDR schemes inside a single project (with the same types names) but also when multiple versions ofstellar-base
are included in a project (like in https://github.com/stellar/js-stellar-sdk/issues/191).I removed the global
types
variable and to make it possible to add new types for an existing context I added a second argument toconfig
function (with default value of{}
).