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

latest releases: v26.2.0-alpha.5, v26.2.0-alpha.4, v26.2.0-alpha.3...
pre-release2 years ago

14.0.0-beta.1 (2022-04-20)

Bug Fixes

  • 🐛 Add feeMultipler logic for batched transaction (0eee833)
  • 🐛 Allow modifyClaims to modify claim with cdd_id 0x00 (72d26fd)
  • 🐛 Allow Accounts to accept becoming multisig signer (4af0afb)
  • 🐛 bump version (ebe849e)
  • 🐛 code smell (550967d)
  • 🐛 Explictly check claim type in isScopedClaim typeguard (#710) (04aa355)
  • 🐛 Expose non-proxied polkadot client (c6ff91b)
  • 🐛 Fetch missing block.hash from middleware queries (05012d6)
  • 🐛 Fix broken tests (61ab6d8)
  • 🐛 Fix test cases (ca41f84)
  • 🐛 make claim typeguards check for type (60e69f7)
  • 🐛 modify regex that was only considering abstract (df6d306)
  • 🐛 Remove unnecessary type assertion (code smell) (374d9ce)
  • 🐛 Remove unused import (f9068a4)
  • 🐛 Reorder params (14c43c0)
  • 🐛 Replace signing identity with account identity while fetching account permissions (e3a7d21)
  • 🐛 stop requiring transaction perms when joining identity (d5e309d)
  • support non PUIS transfer restrictions (5b7c579)

chore

  • 🤖 Add SubsidyWithAllowance interface (117d139)
  • move currentIdentity methods to root (c2e639d)
  • remove order parameter from identity.getTrustingTokens (7c9e62f)
  • rename details to description in CreateVenueParams (d630f61)

Code Refactoring

  • 💡 Rename CADefaults to CADefaultConfig (d60f19c)

Documentation

Features

  • 🎸 [WIP] move currentidentity methods to root (7d78ea1)
  • 🎸 Add createSecurityToken procedure (6e4e944)
  • 🎸 Add getOne method in IdentityAuthorizations (3a604b0)
  • 🎸 Add modify procedure to Requirements (c72974c)
  • 🎸 Add subsidizeAccount procedure (bac9864)
  • 🎸 Add Subsidy.getAllowance method (b1a10d0)
  • 🎸 Add Subsidy entity with quit procedure (1331c7e)
  • 🎸 Add trustedFor method in DefaultTrustedClaimIssuer (#675) (fca5537)
  • 🎸 Add authorization request validations (14b639b)
  • 🎸 Add Authorization Validations (939a80d)
  • 🎸 Add Claim typeguards (#668) (dd86024)
  • 🎸 Add identities namespace (#659) (2fe2593)
  • 🎸 Add Instruction methods to Settlements namespace (05b2ce6)
  • 🎸 Add modify allowance procedures to Subsidy (a716d8e)
  • 🎸 Add reserved to AccountBalance (ebdd5bf)
  • 🎸 Add RotatePrimaryKeyToSecondary Authorization (78d4055)
  • 🎸 Add RotatePrimaryToSecondary consume method (63a69dd)
  • 🎸 Add validations to consumeAddMultiSigSignerAuth (b7cf766)
  • 🎸 Add Venue existance check for Venue operations (112e6b0)
  • 🎸 allow both number and Requirement as params to remove (8afcf1b)
  • 🎸 Allow DID string for set compliance requirements (eac3dbc)
  • 🎸 allow exported TransactionQueue type to have generics (3c6248f)
  • 🎸 Allow non entities for modifying CA checkpoints (2a22aae)
  • 🎸 Allow non entities when creating Distributions (2c814f8)
  • 🎸 allow passing DID instead of identity for claim issuers (1e27c0d)
  • 🎸 allow void procedure methods to be called with opts (9fd4371)
  • 🎸 Assert Relayer accounts have Identities (ba3d114)
  • 🎸 Assert Venue exists when adding an Instruction (d71991f)
  • 🎸 Change totalSupply->initialSupply on asset creation (16e2d0b)
  • 🎸 Check for Portfolio existance in getName function (#672) (daa784c)
  • 🎸 create SigningManager type and local implementation (d083068)
  • 🎸 Create an asset namespace (66b30f4)
  • 🎸 Create an asset namespace (#655) (a2a8f62)
  • 🎸 Creates Account Management namespace (85373c9)
  • 🎸 Don't expose reserved in Balance (3371879)
  • 🎸 Ensure Account has no multisig when accept auth (f69dda8)
  • 🎸 error code no data change (a4972a3)
  • 🎸 export typeguards for every Entity (8e07207)
  • 🎸 Expose SS58 format (5525d7e)
  • 🎸 Make currentFundingRound return null when empty (898d829)
  • 🎸 make requireInvestorUniqueness non-optional (3aa3464)
  • 🎸 modify getSigningAccounts behavior (4b39d46)
  • 🎸 Move createPortfolio to Identities namespace (60c72a0)
  • 🎸 Move createVenue into settlements namespace (#656) (5e1fab3)
  • 🎸 Refactor setComplianceRequirements to use a single call (a253643)
  • 🎸 Remove delete procedure from NumberedPortfolio (078c496)
  • 🎸 remove LocalSigningManager code (a713ebd)
  • 🎸 Remove sdk.currentIdentity namespace (47e27f2)
  • 🎸 Rename "keys" to "account" for consistency (fe76961)
  • 🎸 Rename references to key into Account (7320fa9)
  • 🎸 Rename SecurityToken to Asset (2889e42)
  • 🎸 Rename SecurityToken to Asset (d96d1cb)
  • 🎸 Rename Sto to Offering (0919bcf)
  • 🎸 Replace number with BigNumber (8137a91)
  • 🎸 Return type change for getPrimaryKey (6d5fca9)
  • 🎸 standardize error codes (596661a)
  • 🎸 Throw Polymesh error when createType errors (ff8e6ad)
  • 🎸 Update protocol fee logic (75836e9)
  • 🎸 Use nonce: -1 for signAndSend (#682) (8920e63)
  • 🎸 use polymesh-local for type generation (56eacf8)
  • 🎸 validate Authorization exists (bff30fc)
  • allow setting a CA's checkpoint to null (845ebc2)
  • improve procedure authorization data (135f3c9)
  • return trusted claim issuers separately (1d9db0f)
  • split getAccount and getSigningAccount (644b67b)
  • standardize block data in input and output (67fa54f)
  • support batching different transactions (570256f)
  • support signing managers (35ea5a8)
  • use Entities as properties of other Entities (8298005)

Performance Improvements

  • ⚡️ avoid hash queries where not necessary (f914312)
  • ⚡️ parallelize procedure internals (40d1ffe)
  • ⚡️ remove redundant call (23c5b1a)

BREAKING CHANGES

  • 🧨 account.getPermissions can throw if there is no Identity associated
    with the Account
  • getAccount no longer accepts undefined as an argument.
    To fetch the "current" signing Account, you must call getSigningAccount
  • 🧨 return the accounts in their default order instead of putting the
    current signing account first
    • move leaveIdentity from Account to the AccountManagement namespace
  • rename getAccounts to getSigningAccounts in the AccountManagement namespace
  • change the signature of the Polymesh.connect method so that it receives a
    signingManager: SigningManager. It replaces parameters accountSeed, accountMnemonic,
    accountUri, keyring and signer
  • rename getCurrentIdentity to getSigningIdentity in the Polymesh class
  • remove the addSigner method from the Polymesh class. This behavior is now the responsibility
    of Signing Managers to implement
  • rename the setSigner method in the Polymesh class to setSigningAccount
  • rename signer to signingAccount in ProcedureOpts. This affects users who are signing
    transactions with different accounts per-transaction instead of having an SDK-level signing
    Account
  • remove the exported KeyringPair interface
  • 🧨 Account.getSubsidy now returns SubsidyWithAllowance | null
  • 🧨 Portfolio getName can throw if Portfolio does not exist

Co-authored-by: Victor Vicente VictorVicente@users.noreply.github.com

  • 🧨 DefaultTrustedClaimIssuer.trustedFor has been converted to an async
    method returning claim types for which Claim Issuer is trusted.
  • 🧨
  • TrustedClaimIssuer interface allows null value for trustedFor for specifying all claim types.
  • TrustedClaimIssuers.get now returns TrustedClaimIssuer<true>[]
  • 🧨 Allow null value for trustedFor parameter in
    ModifyTokenTrustedClaimIssuersAddSetParams.claimIssuers to specify all
    claim types for an identity
  • 🧨 Portfolios.create has been removed in favour of
    Identities.createPortfolio
  • 🧨 Context.getSubsidy and Account.getSubsidy now return
    SubsidyWithAllowance | null instead of Omit<Subsidy, 'beneficiary'> | null
  • 🧨 isSingleClaimCondition and isMultiClaimCondition moved from
    src/types/index.ts to src/utils/typeguards.ts
  • 🧨 Moved isPortfolioCustodianRole, isVenueOwnerRole, isCddProviderRole,
    isTickerOwnerRole, isIdentityRole from src/types/index.ts to
    src/utils/typeguards.ts
  • 🧨 InvestorUniqueness, InvestorUniqunessV2, CddClaim converted from type to
    interface
  • 🧨 - SecondaryKey interface has been renamed to PermissionedAccount
  • identity.getPrimaryAccount now returns interface of type PermissionedAccount instead of Account
  • 🧨 Sto -> Offering
  • 🧨 Portfolios.create has been removed in favour of
    Identities.createPortfolio
  • 🧨 Updated all instances of number to BigNumber
  • 🧨 Removes sdk.currentIdentity
  • 🧨 Renamed methods
  • 🧨 Moved methods
  • 🧨 Moves Identity methods
  • 🧨 Moved asset methods
  • 🧨 createVenue moved from currentIdentity to settlements
  • 🧨
  • SecondaryKey interface has been renamed to SigningKey
  • identity.getPrimaryKey now returns interface of type SigningKey instead of Account
    • throw an error on the addInstructions procedure if the instruction array is empty
  • throw an error when running a transaction queue if the caller is being subsidized and one or
    more transactions in the queue can’t be subsidized
  • remove the tag and args properties from PolymeshTransactionBatch. The corresponding data
    about transactions in the batch is now returned by the transactions getter
  • stop splitting batch transaction arguments into smaller chunks when they are too large. This is
    part of a move away from Transaction Queues. Passing large inputs will now result in an error
    on the chain side in some cases. This will be caught and handled before sending in a future
    version
  • remove transaction argument grouping. Before, transactions that took variable sized input
    (such as addDocuments) would attempt to split the argument list if too large
  • 🧨 Move account management methods
  • 🧨 transferTickerOwnership and transferTokenOwnership now return
    AuthorizationRequests instead of Ticker/Token Entities
  • 🧨 Moved methods
  • 🧨 currentFundingRound now returns null for empty funding round, thus
    changing the return type Promise<string | null>
  • 🧨 delete procedure from NumberedPortfolio is removed in favour of
    Portfolios.delete procedure
  • 🧨 TickerReservation.createToken now takes initialSupply instead of
    totalSupply parameter for specifying amount of tokens that will be
    minted on creation
  • 🧨 token.compliance.requirements.remove now takes an object with a
    requirement: number | Requirement property, instead of id: BigNumber. The value still represents the requirement ID
  • token.compliance.requirements.get now returns a ComplianceRequirements object, which contains the requirements as well as the default trusted claim issuers. Conditions without specific claim issuers will have the trustedClaimIssuers` array as undefined
  • 🧨 rename CorporateActionDefaults to CorporateActionDefaultConfig,
    setDefaults to setDefaultConfig, getDefaults to getDefaultConfig
    within the CorporateActions entity.
  • 🧨 make CreateSecurityTokenParams.requireInvestorUniqueness non optional.
    This affects TickerReservation.createToken
  • modify the following interfaces, adding a blockHash: string property:
    ExtrinsicData, DistributionPayment, EventIdentifier, HistoricSettlement
  • change the ProcedureAuthorizationStatus type. The permissions/roles related
    properties will be changed from boolean to CheckPermissionsResult and CheckRolesResult.
    This affects the return type of checkAuthorization in ProcedureMethod
    • replace ticker: string with token: SecurityToken in: Checkpoint, CheckpointSchedule,
      CorporateAction, DividendDistribution, Sto, CustomPermissionGroup,
      KnownPermissionGroup, DefaultTrustedClaimIssuer
  • change the return type of CustomPermissionGroup.toJson. id: BigNumber is now id: string
    • move reserveTicker from root to currentIdentity namespace
  • move removeSecondaryKeys from Identity class to currentIdentity
  • move revokePermissions from Identity class to currentIdentity
  • move modifyPermissions from Identity class to currentIdentity
  • move inviteAccount from Identity class to currentIdentity
  • move createVenue from Identity class to currentIdentity
  • move freezeSecondaryKeys from Identity class to currentIdentity
  • move unfreezeSecondaryKeys from Identity class to currentIdentity
  • change the type of ModifyCheckpointParams.checkpoint to
    Checkpoint | CheckpointSchedule | Date | null
  • 🧨 move isEntity and isPolymeshError from /types to /utils
  • 🧨 remove required undefined as first argument of procedures when passing
    options
  • 🧨 change the code property of most errors thrown by the SDK to better
    reflect their meaning. Also changed a few error messages
    • remove order parameter in getTrustingTokens method.
    • rename details to description in CreateVenueParams interface.

Don't miss a new polymesh-sdk release

NewReleases is sending notifications on new releases.