github PolymeshAssociation/polymesh-sdk v2.0.0-beta.1

latest releases: v26.2.0, v26.2.0-beta.1, v26.2.0-alpha.5...
pre-release3 years ago

2.0.0-beta.1 (2020-11-26)

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 from parent (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 the Venue class (155b3a3)
  • add getCustodiedPortfolios to Identity.portfolios (52c8a29)
  • add getPendingInstructions to CurrentIdentity (a9062db)
  • add getPendingInstructions to the Venue class (eb472c5)
  • add getVenues to CurrentIdentity (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 to Identity (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 to Compliance. There is now a new type called
    RequirementCompliance which represents compliance to a specific asset requirement. Each condition
    inside it has its own complies flag
  • PolymeshTransaction.getFees no longer returns fees as 0 when they are paid by a
    third party. This is now reflected by a paidByThirdParty flag
  • Reorganize utils
    Moved to utils/internal.ts:
  • batchArguments
  • calculateNextKey
  • createClaim
  • delay
  • findEventRecord
  • getDid
  • padString
  • removePadding
  • requestAtBlock
  • requestPaginated
  • serialize
  • unserialize
  • unwrapValue
  • unwrapValues
    Moved to utils/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 and Leg.to changed from Identity to DefaultPortfolio | NumberedPortfolio. This affects the output of Instruction.getLegs
  • Scope filtering in getIdentitiesWithClaims and getTargetingClaims take an
    Scope object instead of a string.
    • Transfers namespace changes to Settlements
  • canTransfer renamed to canSettle
  • areFrozen renamed to isFrozen
  • transfers.freeze(), transfers.unfreeze() and transfers.isFrozen() moved to securityToken.freeze(), securityToken.unfreeze() and securityToken.isFrozen()
  • checkTransfer() renamed to checkSettle()
    • SigningKey interface renamed to SecondaryKey:
  • getSigningKeys() and removeSigningKeys() in CurrentIdentity renamed to getSecondaryKeys() and removeSecondaryKeys()
  • api.registerIdentity() arguments changed from { targetAccount: string | Account; expiry?: Date; signingKeys?: SigningKey[] } to { targetAccount: string | Account; secondaryKeys?: SecondaryKey[] }
  • getMasterKey() in Identity renamed to getPrimaryKey
  • AttestMasterKeyRotation and RotateMasterKey in the AuthorizationType enum renamed to AttestPrimaryKeyRotation and RotatePrimaryKey respectively
  • Rule interface renamed to Requirement
  • RuleCompliance interface renamed to RequirementCompliance (rules key changed to requirements)
  • rules namespace in securityToken.compliance renamed to requirements
  • requirements.set() arguments changed from { rules: Condition[][] } to { requirements: Condition[][] }
  • checkMint() removed from securityToken.compliance.requirements
  • canMint() and transfer() removed from securityToken.transfers
  • treasuryIdentity in SecurityTokenDetails renamed to primaryIssuanceAgent
  • api.governance namespace deleted, and all governance/proposal related classes/functionality disabled
  • securityToken.issuance.issue() arguments changed from { issuanceData: IssuanceData } to { amount: BigNumber }
  • tickerReservation.createSecurityToken() arguments no longer accept a treasury 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 to canSettle
  • areFrozen renamed to isFrozen
  • transfers.freeze(), transfers.unfreeze() and transfers.isFrozen() moved to securityToken.freeze(), securityToken.unfreeze() and securityToken.isFrozen()
    • SigningKey interface renamed to SecondaryKey:
  • getSigningKeys() and removeSigningKeys() in CurrentIdentity renamed to getSecondaryKeys() and removeSecondaryKeys()
  • api.registerIdentity() arguments changed from { targetAccount: string | Account; expiry?: Date; signingKeys?: SigningKey[] } to { targetAccount: string | Account; secondaryKeys?: SecondaryKey[] }
  • getMasterKey() in Identity renamed to getPrimaryKey
  • AttestMasterKeyRotation and RotateMasterKey in the AuthorizationType enum renamed to AttestPrimaryKeyRotation and RotatePrimaryKey respectively
  • Rule interface renamed to Requirement
  • RuleCompliance interface renamed to RequirementCompliance (rules key changed to requirements)
  • rules namespace in securityToken.compliance renamed to requirements
  • requirements.set() arguments changed from { rules: Condition[][] } to { requirements: Condition[][] }
  • checkMint() removed from securityToken.compliance.requirements
  • canMint() and transfer() removed from securityToken.transfers
  • treasuryIdentity in SecurityTokenDetails renamed to primaryIssuanceAgent
  • api.governance namespace deleted, and all governance/proposal related classes/functionality disabled
  • securityToken.issuance.issue() arguments changed from { issuanceData: IssuanceData } to { amount: BigNumber }
  • tickerReservation.createSecurityToken() arguments no longer accept a treasury 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 from string | null to Scope | null and Claim.scope changed from string to Scope This affects multiple endpoints in api.claims:
    • addClaims(), editClaims() and revokeClaims() have Claim as part of their input
    • geetIssuedClaims(), getIdentitiesWithClaims(), getCddClaims() and getTargetingClaims() have Claim as part of their return value
    • getClaimScopes() has ClaimScope[] as its return value

Don't miss a new polymesh-sdk release

NewReleases is sending notifications on new releases.