2.0.0 (2020-12-01)
Bug Fixes
- add primaryIssuanceAgent as new param in checkSettle method (9e1ad3b)
- add validations into numberToBalance utils method (7d42544)
- add validations into numberToBalance utils method (ec2f918)
- allow to issuer identity to cancel pending JoinToIdentity auths (5ca310e)
- await the instruction validity assertion properly (ece367c)
- change Portfolio to DefaultPortfolio (8d71622)
- check paused on asset compliance result (fb53f5c)
- code smell (5af1390)
- convert claims correctly (2619350)
- convert claims correctly (8f4aa1e)
- filter out unreadable tickers when fetching reservations and tokens (ba2f9a9)
- asset requirements: handle the case where requirements are repeated (e4e21fb)
- modify claims: compare input scope and middleware scope correctly (ea508eb)
- modify claims: convert middleware scope before comparing (b0025e6)
- fix
canSettle
getting details fromparent
(60ee94a) - fix how jurisdiction are converted from middleware (19dcf24)
- fix padding issue for scopes when type is Ticker (e34628c)
- fix validation when PIA is set to None (e79beff)
- reject
JoinIdentity
authorizations correctly (d225d38)
chore
- msdk-313 refactor transfers namespace (ad26622)
- msdk-313 refactor transfers namespace (ec725b1)
- rename checkTransfer to checkSettle (ecf8ef9)
- utils refactor (579b0cb)
- polkadot: upgrade types and polkadot API version (f36f129)
Features
- adapt canTransfer to portfolio logic. MSDK-292 (4a2e3b2)
- add
addInstruction
to theVenue
class (155b3a3) - add
getCustodiedPortfolios
toIdentity.portfolios
(52c8a29) - add
getPendingInstructions
toCurrentIdentity
(a9062db) - add
getPendingInstructions
to theVenue
class (eb472c5) - add
getVenues
toCurrentIdentity
(9acac16) - add dti to asset identifier enum. MSDK-287 (fb3bd93)
- add portfolio support to
settlements.canSettle
(108a3bd) - add PortfolioCustodian as new Role (aaed57b)
- add PortfolioCustody and AddMultiSigSigner as AuthorizationType (c1a704e)
- add support for country codes in jurisdiction (29577bc)
- authorize and unauthorize instruction (4271222)
- cover the case where
validFrom
is null (7dd72cf) - create Portfolio related entities (a79e47e)
- create portfolios namespace for Identity (40e3c9d)
- createPortfolio method (e68c1d0)
- deletePortfolio procedure (5a2c5f1)
- get the portfolio creation event (1dc8df6)
- get the portfolio custodian (18416d2)
- getAuthorizationStatuses method (e7e7483)
- getPendingInstructions refactor (227b9df)
- getPortfolio method (3fd83d6)
- getPortfolios method (c622655)
- implement venue and instruction entities (0a12b2a)
- implement venue creation (8fc7140)
- introduce
Scope
type (d90b9e1) - isCustodiedBy method (74ed483)
- middleware class (3bc59bd)
- middleware upgrade to work with chain breaking changes (cd6689f)
- modifyInstructionAuthorization method (19be0e7)
- modifyPrimaryIssuanceAgent and removePrimaryIssuanceAgent (a8e3f72)
- move
getVenues
toIdentity
(1ffd1d8) - moveFunds to owned portfolios (4dd981c)
- portfolio getName method (eb64d24)
- refacor on issueTokens procedure. Task involved: MSDK-261 (eae437b)
- refactor procedure instructions (b66b0aa)
- reject instruction (9edec2c)
- remove BatchIssue constant (af5cad3)
- rename isOwned to isOwnedBy (1136439)
- rename master key and signing key. MSDK-294 (1f7196c)
- rename treasuryIdentity to primaryIssuanceAgent. MSDK-289 (8d19fdb)
- renamePortfolio procedure (9df368a)
- set an account as custodian (56fc3f4)
- support new status codes (068f697)
- upgrade to tooling. Involved tasks: MSDK-284 & MSDK-286 (5b77649)
- compliance: add support for
IsIdentity
condition (8201d5c) - instruction: accept portfolios as input when creating instructions (20be282)
- instruction: add support for portfolios in get/modify auths (26dd0d5)
- instruction: add venue to details (30ad990)
- portfolio: add
getTokenBalances
(630f8df) - portfolios: rename create and delete method (32190f6)
- types: add legacy TxTags (34af879)
BREAKING CHANGES
- polkadot:
RequirementCompliance
renamed toCompliance
. There is now a new type called
RequirementCompliance
which represents compliance to a specific asset requirement. Each condition
inside it has its owncomplies
flag PolymeshTransaction.getFees
no longer returns fees as 0 when they are paid by a
third party. This is now reflected by apaidByThirdParty
flag- Reorganize utils
Moved toutils/internal.ts
:
- batchArguments
- calculateNextKey
- createClaim
- delay
- findEventRecord
- getDid
- padString
- removePadding
- requestAtBlock
- requestPaginated
- serialize
- unserialize
- unwrapValue
- unwrapValues
Moved toutils/conversion.ts
: - accdountIdToString
- addressToKey
- assetComplianceResultToRequirementCompliance
- assetIdentifierToTokenIdentifier
- assetNameToString
- assetTypeToString
- authIdentifierToAuthTarget
- authorizationDataToAuthorization
- authorizationToAuthorizationData
- authorizationTypeToMeshAuthorizationType
- authTargetToAuthIdentifier
- balanceToBigNumber
- booleanToBool
- boolToBoolean
- bytesToString
- canTransferResultToTransferStatus
- cddIdToString
- cddStatusToBoolean
- claimToMeshClaim
- complianceRequirementToRequirement
- dateToMoment
- documentHashToString
- documentNameToString
- documentToTokenDocumentData
- documentUriToString
- endConditionToSettlementType
- extrinsicIdentifierToTxTag
- fundingRoundNameToString
- identityIdToString
- isCusipValid
- isIsinValid
- isLeiValid
- keyToAddress
- meshAuthorizationStatusToAuthorizationStatus
- meshClaimToClaim
- meshInstructionStatusToInstructionStatus
- meshPermissionToPermission
- meshScopeToScope
- meshVenueTypeToVenueType
- middlewareScopeToScope
- moduleAddressToString
- momentToDate
- numberToBalance
- numberToPipId
- numberToU32
- numberToU64
- permissionToMeshPermission
- portfolioIdToMeshPortfolioId
- portfolioLikeToPortfolioId
- posRatioToBigNumber
- requirementToComplianceRequirement
- scopeToMeshScope
- scopeToMiddlewareScope
- secondaryKeyToMeshSecondaryKey
- signatoryToSignerValue
- signerToSignerValue
- signerToString
- signerValueToSignatory
- signerValueToSigner
- stringToAccountId
- stringToAssetName
- stringToBytes
- stringToCddId
- stringToDocumentHash
- stringToDocumentName
- stringToDocumentUri
- stringToFundingRoundName
- stringToIdentityId
- stringToMemo
- stringToText
- stringToTicker
- stringToVenueDetails
- textToString
- tickerToDid
- tickerToString
- toIdentityWithClaimsArray
- tokenDocumentDataToDocument
- tokenIdentifierToAssetIdentifier
- tokenTypeToAssetType
- transactionHexToTxTag
- txTagToExtrinsicIdentifier
- txTagToProtocolOp
- u8ToTransferStatus
- u64ToBigNumber
- venueDetailsToString
- venueTypeToMeshVenueType
- instruction:
Leg.from
andLeg.to
changed fromIdentity
toDefaultPortfolio | NumberedPortfolio
. This affects the output ofInstruction.getLegs
- Scope filtering in
getIdentitiesWithClaims
andgetTargetingClaims
take an
Scope
object instead of a string. -
- Transfers namespace changes to Settlements
canTransfer
renamed tocanSettle
areFrozen
renamed toisFrozen
transfers.freeze()
,transfers.unfreeze()
andtransfers.isFrozen()
moved tosecurityToken.freeze()
,securityToken.unfreeze()
andsecurityToken.isFrozen()
checkTransfer()
renamed tocheckSettle()
-
SigningKey
interface renamed toSecondaryKey
:
getSigningKeys()
andremoveSigningKeys()
inCurrentIdentity
renamed togetSecondaryKeys()
andremoveSecondaryKeys()
api.registerIdentity()
arguments changed from{ targetAccount: string | Account; expiry?: Date; signingKeys?: SigningKey[] }
to{ targetAccount: string | Account; secondaryKeys?: SecondaryKey[] }
getMasterKey()
inIdentity
renamed togetPrimaryKey
AttestMasterKeyRotation
andRotateMasterKey
in theAuthorizationType
enum renamed toAttestPrimaryKeyRotation
andRotatePrimaryKey
respectivelyRule
interface renamed toRequirement
RuleCompliance
interface renamed toRequirementCompliance
(rules
key changed torequirements
)rules
namespace insecurityToken.compliance
renamed torequirements
requirements.set()
arguments changed from{ rules: Condition[][] }
to{ requirements: Condition[][] }
checkMint()
removed fromsecurityToken.compliance.requirements
canMint()
andtransfer()
removed fromsecurityToken.transfers
treasuryIdentity
inSecurityTokenDetails
renamed toprimaryIssuanceAgent
api.governance
namespace deleted, and all governance/proposal related classes/functionality disabledsecurityToken.issuance.issue()
arguments changed from{ issuanceData: IssuanceData }
to{ amount: BigNumber }
tickerReservation.createSecurityToken()
arguments no longer accept atreasury
parameter. The treasury DID is now always the issuer by default- Jurisdiction claim interface changed to
{ type: ClaimType.Jurisdiction; code: CountryCode; scope: Scope }
- Transfers namespace changes to Settlements
canTransfer
renamed tocanSettle
areFrozen
renamed toisFrozen
transfers.freeze()
,transfers.unfreeze()
andtransfers.isFrozen()
moved tosecurityToken.freeze()
,securityToken.unfreeze()
andsecurityToken.isFrozen()
-
SigningKey
interface renamed toSecondaryKey
:
getSigningKeys()
andremoveSigningKeys()
inCurrentIdentity
renamed togetSecondaryKeys()
andremoveSecondaryKeys()
api.registerIdentity()
arguments changed from{ targetAccount: string | Account; expiry?: Date; signingKeys?: SigningKey[] }
to{ targetAccount: string | Account; secondaryKeys?: SecondaryKey[] }
getMasterKey()
inIdentity
renamed togetPrimaryKey
AttestMasterKeyRotation
andRotateMasterKey
in theAuthorizationType
enum renamed toAttestPrimaryKeyRotation
andRotatePrimaryKey
respectivelyRule
interface renamed toRequirement
RuleCompliance
interface renamed toRequirementCompliance
(rules
key changed torequirements
)rules
namespace insecurityToken.compliance
renamed torequirements
requirements.set()
arguments changed from{ rules: Condition[][] }
to{ requirements: Condition[][] }
checkMint()
removed fromsecurityToken.compliance.requirements
canMint()
andtransfer()
removed fromsecurityToken.transfers
treasuryIdentity
inSecurityTokenDetails
renamed toprimaryIssuanceAgent
api.governance
namespace deleted, and all governance/proposal related classes/functionality disabledsecurityToken.issuance.issue()
arguments changed from{ issuanceData: IssuanceData }
to{ amount: BigNumber }
tickerReservation.createSecurityToken()
arguments no longer accept atreasury
parameter. The treasury DID is now always the issuer by default- Jurisdiction claim interface changed to
{ type: ClaimType.Jurisdiction; code: CountryCode; scope: Scope }
ClaimScope.scope
changed fromstring | null
toScope | null
andClaim.scope
changed fromstring
toScope
This affects multiple endpoints inapi.claims
:addClaims()
,editClaims()
andrevokeClaims()
haveClaim
as part of their inputgeetIssuedClaims()
,getIdentitiesWithClaims()
,getCddClaims()
andgetTargetingClaims()
haveClaim
as part of their return valuegetClaimScopes()
hasClaimScope[]
as its return value