14.0.0-beta.1 (2022-04-20)
Bug Fixes
- 🐛 Add
feeMultipler
logic for batched transaction (0eee833) - 🐛 Allow
modifyClaims
to modify claim with cdd_id0x00
(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
-
✏️ Update JSDocs and error messages (ef0bf7f)
-
Merge pull request #673 from PolymathNetwork/feat/MSDK-728 (725ba40), closes #673
-
Merge pull request #665 from PolymathNetwork/feat/MSDK-760 (feefe0c), closes #665
-
Msdk 723 return authorizations (#650) (a86f517), closes #650
Features
- 🎸 [WIP] move currentidentity methods to root (7d78ea1)
- 🎸 Add
createSecurityToken
procedure (6e4e944) - 🎸 Add
getOne
method inIdentityAuthorizations
(3a604b0) - 🎸 Add
modify
procedure toRequirements
(c72974c) - 🎸 Add
subsidizeAccount
procedure (bac9864) - 🎸 Add
Subsidy.getAllowance
method (b1a10d0) - 🎸 Add
Subsidy
entity withquit
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
returnnull
when empty (898d829) - 🎸 make
requireInvestorUniqueness
non-optional (3aa3464) - 🎸 modify
getSigningAccounts
behavior (4b39d46) - 🎸 Move
createPortfolio
toIdentities
namespace (60c72a0) - 🎸 Move createVenue into settlements namespace (#656) (5e1fab3)
- 🎸 Refactor setComplianceRequirements to use a single call (a253643)
- 🎸 Remove
delete
procedure fromNumberedPortfolio
(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
withBigNumber
(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
andgetSigningAccount
(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 callgetSigningAccount
- 🧨 return the accounts in their default order instead of putting the
current signing account first -
- move
leaveIdentity
fromAccount
to theAccountManagement
namespace
- move
- rename
getAccounts
togetSigningAccounts
in theAccountManagement
namespace - change the signature of the
Polymesh.connect
method so that it receives a
signingManager: SigningManager
. It replaces parametersaccountSeed
,accountMnemonic
,
accountUri
,keyring
andsigner
- rename
getCurrentIdentity
togetSigningIdentity
in thePolymesh
class - remove the
addSigner
method from thePolymesh
class. This behavior is now the responsibility
of Signing Managers to implement - rename the
setSigner
method in thePolymesh
class tosetSigningAccount
- rename
signer
tosigningAccount
inProcedureOpts
. 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 returnsSubsidyWithAllowance | 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 fortrustedFor
for specifying all claim types.TrustedClaimIssuers.get
now returnsTrustedClaimIssuer<true>[]
- 🧨 Allow
null
value fortrustedFor
parameter in
ModifyTokenTrustedClaimIssuersAddSetParams.claimIssuers
to specify all
claim types for an identity - 🧨 Portfolios.create has been removed in favour of
Identities.createPortfolio - 🧨
Context.getSubsidy
andAccount.getSubsidy
now return
SubsidyWithAllowance | null
instead ofOmit<Subsidy, 'beneficiary'> | null
- 🧨 isSingleClaimCondition and isMultiClaimCondition moved from
src/types/index.ts
tosrc/utils/typeguards.ts
- 🧨 Moved isPortfolioCustodianRole, isVenueOwnerRole, isCddProviderRole,
isTickerOwnerRole, isIdentityRole fromsrc/types/index.ts
to
src/utils/typeguards.ts
- 🧨 InvestorUniqueness, InvestorUniqunessV2, CddClaim converted from type to
interface - 🧨 -
SecondaryKey
interface has been renamed toPermissionedAccount
identity.getPrimaryAccount
now returns interface of typePermissionedAccount
instead ofAccount
- 🧨 Sto -> Offering
- 🧨
Portfolios.create
has been removed in favour of
Identities.createPortfolio
- 🧨 Updated all instances of
number
toBigNumber
- 🧨 Removes sdk.currentIdentity
- 🧨 Renamed methods
- 🧨 Moved methods
- 🧨 Moves Identity methods
- 🧨 Moved asset methods
- 🧨 createVenue moved from currentIdentity to settlements
- 🧨
SecondaryKey
interface has been renamed toSigningKey
identity.getPrimaryKey
now returns interface of typeSigningKey
instead ofAccount
-
- throw an error on the
addInstructions
procedure if the instruction array is empty
- throw an error on the
- 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
andargs
properties fromPolymeshTransactionBatch
. The corresponding data
about transactions in the batch is now returned by thetransactions
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 asaddDocuments
) 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 typePromise<string | null>
- 🧨
delete
procedure fromNumberedPortfolio
is removed in favour of
Portfolios.delete
procedure - 🧨
TickerReservation.createToken
now takesinitialSupply
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 ofid: BigNumber
. The value still represents the requirement ID token.compliance.requirements.get
now returns aComplianceRequirements 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
toCorporateActionDefaultConfig
,
setDefaults
tosetDefaultConfig
,getDefaults
togetDefaultConfig
within theCorporateActions
entity. - 🧨 make
CreateSecurityTokenParams.requireInvestorUniqueness
non optional.
This affectsTickerReservation.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 fromboolean
toCheckPermissionsResult
andCheckRolesResult
.
This affects the return type ofcheckAuthorization
inProcedureMethod
-
- replace
ticker: string
withtoken: SecurityToken
in:Checkpoint
,CheckpointSchedule
,
CorporateAction
,DividendDistribution
,Sto
,CustomPermissionGroup
,
KnownPermissionGroup
,DefaultTrustedClaimIssuer
- replace
- change the return type of
CustomPermissionGroup.toJson
.id: BigNumber
is nowid: string
-
- move
reserveTicker
from root tocurrentIdentity
namespace
- move
- move
removeSecondaryKeys
fromIdentity
class tocurrentIdentity
- move
revokePermissions
fromIdentity
class tocurrentIdentity
- move
modifyPermissions
fromIdentity
class tocurrentIdentity
- move
inviteAccount
fromIdentity
class tocurrentIdentity
- move
createVenue
fromIdentity
class tocurrentIdentity
- move
freezeSecondaryKeys
fromIdentity
class tocurrentIdentity
- move
unfreezeSecondaryKeys
fromIdentity
class tocurrentIdentity
- change the type of
ModifyCheckpointParams.checkpoint
to
Checkpoint | CheckpointSchedule | Date | null
- 🧨 move
isEntity
andisPolymeshError
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.
- remove
-
- rename
details
todescription
in CreateVenueParams interface.
- rename