Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 7f36c2e

Browse files
chore: 🤖 update latest images
1 parent 29fcf7d commit 7f36c2e

File tree

10 files changed

+68
-64
lines changed

10 files changed

+68
-64
lines changed

envs/7.0.0.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CHAIN_IMAGE=polymeshassociation/polymesh:latest-develop-debian
2-
SUBQUERY_INDEXER_IMAGE=polymeshassociation/polymesh-subquery:v18.0.0
2+
SUBQUERY_INDEXER_IMAGE=polymeshassociation/polymesh-subquery:v18.0.1
33

44
SUBQUERY_QUERY_IMAGE=onfinality/subql-query:v2.11.0
5-
REST_IMAGE=polymeshassociation/polymesh-rest-api:v6.1.0-alpha.6
5+
REST_IMAGE=polymeshassociation/polymesh-rest-api:v6.1.0-alpha.8

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"@polkadot/wasm-crypto": "7.2.2",
7272
"@polymeshassociation/hashicorp-vault-signing-manager": "^3.0.1",
7373
"@polymeshassociation/local-signing-manager": "^3.1.0",
74-
"@polymeshassociation/polymesh-sdk": "27.0.0-alpha.1",
74+
"@polymeshassociation/polymesh-sdk": "27.0.0-alpha.3",
7575
"cross-fetch": "^4.0.0",
7676
"dotenv": "^16.0.3"
7777
},

src/__tests__/rest/amqp.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { RestClient } from '~/rest';
33
import { createAssetParams } from '~/rest/assets/params';
44
import { ProcessMode } from '~/rest/common';
55
import { Identity } from '~/rest/identities/interfaces';
6+
import { RestSuccessResult } from '~/rest/interfaces';
67
import { sleep } from '~/util';
78

89
const handles = ['issuer', 'investor'];
@@ -12,7 +13,7 @@ describe('AMQP process mode', () => {
1213
let restClient: RestClient;
1314
let signer: string;
1415
let issuer: Identity;
15-
let ticker: string;
16+
let assetId: string;
1617

1718
beforeAll(async () => {
1819
factory = await TestFactory.create({ handles });
@@ -42,10 +43,11 @@ describe('AMQP process mode', () => {
4243
},
4344
});
4445

46+
assetId = (txData as RestSuccessResult).asset as string;
4547
const pollInterval = 3000;
4648
let assetMade = false;
4749
for (let i = 0; i < 10; i++) {
48-
const response = await restClient.assets.getAsset(ticker);
50+
const response = await restClient.assets.getAsset(assetId);
4951

5052
const statusCode = (response as { statusCode: number }).statusCode;
5153

src/__tests__/rest/tickerReservations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('Ticker Reservations', () => {
4141

4242
const result = await restClient.tickerReservations.reserve(params);
4343

44-
expect(result).toEqual(assertTagPresent(expect, 'asset.registerTicker'));
44+
expect(result).toEqual(assertTagPresent(expect, 'asset.registerUniqueTicker'));
4545
});
4646

4747
it('should get details about the reservation', async () => {
@@ -60,7 +60,7 @@ describe('Ticker Reservations', () => {
6060
options: { processMode: ProcessMode.Submit, signer },
6161
});
6262

63-
expect(result).toEqual(assertTagPresent(expect, 'asset.registerTicker'));
63+
expect(result).toEqual(assertTagPresent(expect, 'asset.registerUniqueTicker'));
6464
});
6565

6666
it('should transfer ownership', async () => {

src/rest/assets/client.ts

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -26,109 +26,109 @@ export class Assets {
2626
return this.client.post('/assets/create', params);
2727
}
2828

29-
public async getAsset(ticker: string): Promise<unknown> {
30-
return this.client.get(`/assets/${ticker}`);
29+
public async getAsset(asset: string): Promise<unknown> {
30+
return this.client.get(`/assets/${asset}`);
3131
}
3232

3333
public async getGlobalMetadata(): Promise<unknown> {
3434
return this.client.get('/assets/global-metadata');
3535
}
3636

37-
public async getMetadata(ticker: string): Promise<unknown> {
38-
return this.client.get(`/assets/${ticker}/metadata`);
37+
public async getMetadata(asset: string): Promise<unknown> {
38+
return this.client.get(`/assets/${asset}/metadata`);
3939
}
4040

41-
public async getMetadataById(ticker: string, type: MetadataType, id: string): Promise<unknown> {
42-
return this.client.get(`assets/${ticker}/metadata/${type}/${id}`);
41+
public async getMetadataById(asset: string, type: MetadataType, id: string): Promise<unknown> {
42+
return this.client.get(`assets/${asset}/metadata/${type}/${id}`);
4343
}
4444

4545
public async createMetadata(
46-
ticker: string,
46+
asset: string,
4747
params: ReturnType<typeof createMetadataParams>
4848
): Promise<PostResult> {
49-
return this.client.post(`/assets/${ticker}/metadata/create`, params);
49+
return this.client.post(`/assets/${asset}/metadata/create`, params);
5050
}
5151

5252
public async setMetadataValue(
53-
ticker: string,
53+
asset: string,
5454
type: MetadataType,
5555
id: string,
5656
params: ReturnType<typeof setMetadataParams>
5757
): Promise<PostResult> {
58-
return this.client.post(`/assets/${ticker}/metadata/${type}/${id}/set`, params);
58+
return this.client.post(`/assets/${asset}/metadata/${type}/${id}/set`, params);
5959
}
6060

61-
public async getDocuments(ticker: string): Promise<unknown> {
62-
return this.client.get(`assets/${ticker}/documents`);
61+
public async getDocuments(asset: string): Promise<unknown> {
62+
return this.client.get(`assets/${asset}/documents`);
6363
}
6464

65-
public async getAssetMediators(ticker: string): Promise<unknown> {
66-
return this.client.get(`assets/${ticker}/required-mediators`);
65+
public async getAssetMediators(asset: string): Promise<unknown> {
66+
return this.client.get(`assets/${asset}/required-mediators`);
6767
}
6868

6969
public async setDocuments(
70-
ticker: string,
70+
asset: string,
7171
params: ReturnType<typeof setAssetDocumentParams>
7272
): Promise<PostResult> {
73-
return this.client.post(`assets/${ticker}/documents/set`, params);
73+
return this.client.post(`assets/${asset}/documents/set`, params);
7474
}
7575

7676
public async redeem(
77-
ticker: string,
77+
asset: string,
7878
params: ReturnType<typeof redeemTokenParams>
7979
): Promise<PostResult> {
80-
return this.client.post(`assets/${ticker}/redeem`, params);
80+
return this.client.post(`assets/${asset}/redeem`, params);
8181
}
8282

8383
public async addAssetMediators(
84-
ticker: string,
84+
asset: string,
8585
params: ReturnType<typeof assetMediatorsParams>
8686
): Promise<PostResult> {
87-
return this.client.post(`assets/${ticker}/add-required-mediators`, params);
87+
return this.client.post(`assets/${asset}/add-required-mediators`, params);
8888
}
8989

9090
public async removeAssetMediators(
91-
ticker: string,
91+
asset: string,
9292
params: ReturnType<typeof assetMediatorsParams>
9393
): Promise<PostResult> {
94-
return this.client.post(`assets/${ticker}/remove-required-mediators`, params);
94+
return this.client.post(`assets/${asset}/remove-required-mediators`, params);
9595
}
9696

9797
public async transferAssetOwnership(
98-
ticker: string,
98+
asset: string,
9999
params: ReturnType<typeof transferAssetOwnershipParams>
100100
): Promise<Record<string, unknown>> {
101-
return this.client.post(`assets/${ticker}/transfer-ownership`, params);
101+
return this.client.post(`assets/${asset}/transfer-ownership`, params);
102102
}
103103

104-
public async preApprove(ticker: string, params: TxBase): Promise<PostResult> {
105-
return this.client.post(`assets/${ticker}/pre-approve`, { ...params });
104+
public async preApprove(asset: string, params: TxBase): Promise<PostResult> {
105+
return this.client.post(`assets/${asset}/pre-approve`, { ...params });
106106
}
107107

108-
public async removePreApproval(ticker: string, params: TxBase): Promise<PostResult> {
109-
return this.client.post(`assets/${ticker}/remove-pre-approval`, { ...params });
108+
public async removePreApproval(asset: string, params: TxBase): Promise<PostResult> {
109+
return this.client.post(`assets/${asset}/remove-pre-approval`, { ...params });
110110
}
111111

112-
public async getIsPreApproved(ticker: string, did: string): Promise<unknown> {
113-
return this.client.get(`identities/${did}/is-pre-approved?ticker=${ticker}`);
112+
public async getIsPreApproved(asset: string, did: string): Promise<unknown> {
113+
return this.client.get(`identities/${did}/is-pre-approved?asset=${asset}`);
114114
}
115115

116116
public async getPreApprovals(did: string): Promise<unknown> {
117117
return this.client.get(`identities/${did}/pre-approved-assets`);
118118
}
119119

120120
public async issue(
121-
ticker: string,
121+
asset: string,
122122
params: ReturnType<typeof issueAssetParams>
123123
): Promise<PostResult> {
124-
return this.client.post(`assets/${ticker}/issue`, params);
124+
return this.client.post(`assets/${asset}/issue`, params);
125125
}
126126

127-
public async freeze(ticker: string, params: TxBase): Promise<PostResult> {
128-
return this.client.post(`assets/${ticker}/freeze`, { ...params });
127+
public async freeze(asset: string, params: TxBase): Promise<PostResult> {
128+
return this.client.post(`assets/${asset}/freeze`, { ...params });
129129
}
130130

131-
public async unfreeze(ticker: string, params: TxBase): Promise<PostResult> {
132-
return this.client.post(`assets/${ticker}/unfreeze`, { ...params });
131+
public async unfreeze(asset: string, params: TxBase): Promise<PostResult> {
132+
return this.client.post(`assets/${asset}/unfreeze`, { ...params });
133133
}
134134
}

src/rest/compliance/params.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export type ConditionParams = {
2020

2121
export const bothConditionsRequirements = (
2222
issuer: string,
23-
ticker: string,
23+
asset: string,
2424
blockedIdentity: string,
2525
blockedJurisdiction: string
2626
): ConditionParams[] => [
@@ -31,19 +31,19 @@ export const bothConditionsRequirements = (
3131
{ type: 'Blocked', scope: { type: ScopeType.Identity, value: blockedIdentity } },
3232
{
3333
type: 'Jurisdiction',
34-
scope: { type: ScopeType.Ticker, value: ticker },
34+
scope: { type: ScopeType.Asset, value: asset },
3535
code: blockedJurisdiction,
3636
},
3737
],
3838
trustedClaimIssuers: [{ trustedFor: ['Blocked'], identity: issuer }],
3939
},
4040
];
4141

42-
export const kycRequirements = (ticker: string, trustedIdentity: string): ConditionParams[] => [
42+
export const kycRequirements = (asset: string, trustedIdentity: string): ConditionParams[] => [
4343
{
4444
target: ConditionTarget.Receiver,
4545
type: ConditionType.IsPresent,
46-
claim: { type: 'KnowYourCustomer', scope: { type: ScopeType.Ticker, value: ticker } },
46+
claim: { type: 'KnowYourCustomer', scope: { type: ScopeType.Asset, value: asset } },
4747
trustedClaimIssuers: [
4848
{
4949
trustedFor: ['KnowYourCustomer'],
@@ -54,14 +54,14 @@ export const kycRequirements = (ticker: string, trustedIdentity: string): Condit
5454
];
5555

5656
export const blockedJurisdictionRequirements = (
57-
ticker: string,
57+
asset: string,
5858
trustedIdentity: string,
5959
code: string
6060
): ConditionParams[] => [
6161
{
6262
target: ConditionTarget.Receiver,
6363
type: ConditionType.IsAbsent,
64-
claim: { type: 'Jurisdiction', scope: { type: ScopeType.Ticker, value: ticker }, code },
64+
claim: { type: 'Jurisdiction', scope: { type: ScopeType.Asset, value: asset }, code },
6565
trustedClaimIssuers: [
6666
{
6767
trustedFor: ['Jurisdiction'],
@@ -72,13 +72,13 @@ export const blockedJurisdictionRequirements = (
7272
];
7373

7474
export const blockedIdentityRequirements = (
75-
ticker: string,
75+
asset: string,
7676
targetIdentity: string
7777
): ConditionParams[] => [
7878
{
7979
target: ConditionTarget.Receiver,
8080
type: ConditionType.IsAbsent,
81-
claim: { type: 'Blocked', scope: { type: ScopeType.Ticker, value: ticker } },
81+
claim: { type: 'Blocked', scope: { type: ScopeType.Asset, value: asset } },
8282
trustedClaimIssuers: [
8383
{
8484
trustedFor: ['Blocked'],

src/rest/nfts/client.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class Nfts {
1010
): Promise<string> {
1111
const result = (await this.createNftCollection(params)) as RestSuccessResult;
1212

13-
return result.asset as string;
13+
return result.collection as string;
1414
}
1515

1616
public async createNftCollection(
@@ -20,17 +20,17 @@ export class Nfts {
2020
}
2121

2222
public async issueNft(
23-
ticker: string,
23+
collection: string,
2424
params: ReturnType<typeof issueNftParams>
2525
): Promise<PostResult> {
26-
return this.client.post(`/nfts/${ticker}/issue`, params);
26+
return this.client.post(`/nfts/${collection}/issue`, params);
2727
}
2828

29-
public async getCollectionKeys(ticker: string): Promise<unknown> {
30-
return this.client.get(`/nfts/${ticker}/collection-keys`);
29+
public async getCollectionKeys(collection: string): Promise<unknown> {
30+
return this.client.get(`/nfts/${collection}/collection-keys`);
3131
}
3232

33-
public async getNftDetails(ticker: string, id: string): Promise<unknown> {
34-
return this.client.get(`/nfts/${ticker}/${id}`);
33+
public async getNftDetails(collection: string, id: string): Promise<unknown> {
34+
return this.client.get(`/nfts/${collection}/${id}`);
3535
}
3636
}

src/rest/portfolios/params.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const portfolioParams = (name: string, base: TxBase, extras: TxExtras = {
88
} as const);
99

1010
export const moveAssetParams = (
11-
ticker: string,
11+
asset: string,
1212
from: string,
1313
to: string,
1414
base: TxBase,
@@ -19,7 +19,7 @@ export const moveAssetParams = (
1919
to,
2020
items: [
2121
{
22-
ticker,
22+
asset,
2323
amount: '1000',
2424
memo: 'Transferring to test redemption',
2525
},

src/rest/settlements/params.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const fungibleInstructionParams = (
2828
did: to,
2929
id: 0,
3030
},
31+
type: 'onChain',
3132
asset: assetId,
3233
},
3334
],
@@ -56,6 +57,7 @@ export const nftInstructionParams = (
5657
did: to,
5758
id: 0,
5859
},
60+
type: 'onChain',
5961
asset: collectionId,
6062
},
6163
],

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,10 +1509,10 @@
15091509
dependencies:
15101510
"@polymeshassociation/signing-manager-types" "^3.2.0"
15111511

1512-
"@polymeshassociation/[email protected].1":
1513-
version "27.0.0-alpha.1"
1514-
resolved "https://registry.yarnpkg.com/@polymeshassociation/polymesh-sdk/-/polymesh-sdk-27.0.0-alpha.1.tgz#810ec38014b91712e2a41d12db3e1823793df8c5"
1515-
integrity sha512-jhbiePldCucVPOYWfol7tmk7fmYpfjwUfKKf7ZQzMXkgqwaEhRAxfCNvt1CaKvD9CK8S5G1JN4gg4yBjABkv8g==
1512+
"@polymeshassociation/[email protected].3":
1513+
version "27.0.0-alpha.3"
1514+
resolved "https://registry.yarnpkg.com/@polymeshassociation/polymesh-sdk/-/polymesh-sdk-27.0.0-alpha.3.tgz#7ab1c92c5c05b5fe8b4eeb383320c7ded0b5c9c7"
1515+
integrity sha512-QZE+ewN6Rfa8BXx2qcfR10m2bvsLuekDukXCtb5e3f8EiXRaJNkKQ34+L5Jf5eLZYJtqxeZBRRFwzzrgzVFlbw==
15161516
dependencies:
15171517
"@apollo/client" "^3.8.1"
15181518
"@polkadot/api" "11.2.1"

0 commit comments

Comments
 (0)