From 2b8fae0efd9c8637cfb3b7573b812cbb21f641f8 Mon Sep 17 00:00:00 2001 From: Boldizsar Mezei Date: Wed, 21 Feb 2024 09:36:05 +0100 Subject: [PATCH] Rename Build5OtrAddress to SoonaverseOtrAddress --- packages/sdk/examples/auction/otr/create.ts | 4 ++-- packages/sdk/examples/nft/otr/bulk_purchase.ts | 4 ++-- packages/sdk/examples/nft/otr/purchase.ts | 4 ++-- packages/sdk/examples/nft/otr/transfer.ts | 4 ++-- packages/sdk/examples/stamp/otr/create.ts | 6 +++--- packages/sdk/examples/swap/otr/create.ts | 4 ++-- packages/sdk/examples/token/otr/trade.ts | 4 ++-- packages/sdk/src/index.ts | 2 +- packages/sdk/src/otr/index.ts | 7 ++++--- packages/sdk/test/otr/otr.spec.ts | 4 ++-- 10 files changed, 22 insertions(+), 21 deletions(-) diff --git a/packages/sdk/examples/auction/otr/create.ts b/packages/sdk/examples/auction/otr/create.ts index 7c525a5e8f..9b8341587a 100644 --- a/packages/sdk/examples/auction/otr/create.ts +++ b/packages/sdk/examples/auction/otr/create.ts @@ -1,10 +1,10 @@ import { Dataset, Network } from '@build-5/interfaces'; -import { Build5, Build5OtrAddress, SoonaverseApiKey, https, otr } from '@build-5/sdk'; +import { Build5, SoonaverseOtrAddress, SoonaverseApiKey, https, otr } from '@build-5/sdk'; async function main() { const origin = Build5.TEST; // @ts-ignore - const otrAddress = Build5OtrAddress[origin]; + const otrAddress = SoonaverseOtrAddress[origin]; try { // To create a generic auction we send an otr request with the needed params diff --git a/packages/sdk/examples/nft/otr/bulk_purchase.ts b/packages/sdk/examples/nft/otr/bulk_purchase.ts index 20b3ba401f..0a96dd03bb 100644 --- a/packages/sdk/examples/nft/otr/bulk_purchase.ts +++ b/packages/sdk/examples/nft/otr/bulk_purchase.ts @@ -1,12 +1,12 @@ import { Dataset } from '@build-5/interfaces'; -import { Build5, Build5OtrAddress, otr } from '@build-5/sdk'; +import { Build5, SoonaverseOtrAddress, otr } from '@build-5/sdk'; const collectionId = 'build5nftcollectionid'; const nftIds = ['build5nftid1', 'build5nftid2']; const origin = Build5.TEST; // @ts-ignore -const otrAddress = Build5OtrAddress[origin]; +const otrAddress = SoonaverseOtrAddress[origin]; async function main() { const otrRequest = otr(otrAddress) diff --git a/packages/sdk/examples/nft/otr/purchase.ts b/packages/sdk/examples/nft/otr/purchase.ts index 43fee324ef..f63fd47f10 100644 --- a/packages/sdk/examples/nft/otr/purchase.ts +++ b/packages/sdk/examples/nft/otr/purchase.ts @@ -1,12 +1,12 @@ import { Dataset } from '@build-5/interfaces'; -import { Build5, Build5OtrAddress, https, otr, SoonaverseApiKey } from '@build-5/sdk'; +import { Build5, SoonaverseOtrAddress, https, otr, SoonaverseApiKey } from '@build-5/sdk'; const collectionId = 'build5collectionid1'; const nftId = 'build5nftid1'; const origin = Build5.TEST; // @ts-ignore -const otrAddress = Build5OtrAddress[origin]; +const otrAddress = SoonaverseOtrAddress[origin]; async function main() { const otrRequest = otr(otrAddress) diff --git a/packages/sdk/examples/nft/otr/transfer.ts b/packages/sdk/examples/nft/otr/transfer.ts index b655ab34aa..cc0e6827b1 100644 --- a/packages/sdk/examples/nft/otr/transfer.ts +++ b/packages/sdk/examples/nft/otr/transfer.ts @@ -1,9 +1,9 @@ import { Dataset } from '@build-5/interfaces'; -import { Build5, Build5OtrAddress, otr } from '@build-5/sdk'; +import { Build5, SoonaverseOtrAddress, otr } from '@build-5/sdk'; const origin = Build5.TEST; // @ts-ignore -const otrAddress = Build5OtrAddress[origin]; +const otrAddress = SoonaverseOtrAddress[origin]; async function main() { const otrRequest = otr(otrAddress) diff --git a/packages/sdk/examples/stamp/otr/create.ts b/packages/sdk/examples/stamp/otr/create.ts index 7807f7b0f2..779b5fb211 100644 --- a/packages/sdk/examples/stamp/otr/create.ts +++ b/packages/sdk/examples/stamp/otr/create.ts @@ -1,14 +1,14 @@ import { Dataset } from '@build-5/interfaces'; -import { Build5, Build5OtrAddress, otr } from '@build-5/sdk'; +import { Build5, SoonaverseOtrAddress, otr } from '@build-5/sdk'; async function main() { const origin = Build5.TEST; // @ts-ignore - const otrAddress = Build5OtrAddress[origin]; + const otrAddress = SoonaverseOtrAddress[origin]; console.log('Create stamp under your project...'); try { - const otrRequest = await otr(otrAddress) + const otrRequest = otr(otrAddress) .dataset(Dataset.STAMP) .stamp({ uri: 'https://www.africau.edu/images/default/sample.pdf' }); diff --git a/packages/sdk/examples/swap/otr/create.ts b/packages/sdk/examples/swap/otr/create.ts index ff1ff85653..c928cc630f 100644 --- a/packages/sdk/examples/swap/otr/create.ts +++ b/packages/sdk/examples/swap/otr/create.ts @@ -1,10 +1,10 @@ import { Dataset } from '@build-5/interfaces'; -import { Build5, Build5OtrAddress, otr } from '@build-5/sdk'; +import { Build5, SoonaverseOtrAddress, otr } from '@build-5/sdk'; async function main() { const origin = Build5.TEST; // @ts-ignore - const otrAddress = Build5OtrAddress[origin]; + const otrAddress = SoonaverseOtrAddress[origin]; console.log('Create swap. Set network, recipient and asks.'); console.log('Asks can be base token, native tokens and nfts'); diff --git a/packages/sdk/examples/token/otr/trade.ts b/packages/sdk/examples/token/otr/trade.ts index fc4b57afb3..fce47124d5 100644 --- a/packages/sdk/examples/token/otr/trade.ts +++ b/packages/sdk/examples/token/otr/trade.ts @@ -1,9 +1,9 @@ import { Dataset } from '@build-5/interfaces'; -import { otr } from '@build-5/sdk'; +import { otr, SoonaverseOtrAddress } from '@build-5/sdk'; async function main() { // @ts-ignore - const otrAddress = Build5OtrAddress[origin]; + const otrAddress = SoonaverseOtrAddress[origin]; try { const otrRequestBuy = await otr(otrAddress).dataset(Dataset.TOKEN).buyToken({ diff --git a/packages/sdk/src/index.ts b/packages/sdk/src/index.ts index bf95528b7d..ce7dff4dac 100644 --- a/packages/sdk/src/index.ts +++ b/packages/sdk/src/index.ts @@ -1,2 +1,2 @@ export { Build5, SoonaverseApiKey, https } from './https'; -export { Build5OtrAddress, otr } from './otr'; +export { SoonaverseOtrAddress, otr } from './otr'; diff --git a/packages/sdk/src/otr/index.ts b/packages/sdk/src/otr/index.ts index d63d1c2b63..ee704d70e1 100644 --- a/packages/sdk/src/otr/index.ts +++ b/packages/sdk/src/otr/index.ts @@ -1,11 +1,12 @@ import { OtrWrapper } from './otr'; -export const otr = (otrAddress: string = Build5OtrAddress.SHIMMER) => new OtrWrapper(otrAddress); +export const otr = (otrAddress: string = SoonaverseOtrAddress.SHIMMER) => + new OtrWrapper(otrAddress); /** - * Build.5 OTR Addresses per chain. + * Soonaverse OTR Addresses per chain. */ -export enum Build5OtrAddress { +export enum SoonaverseOtrAddress { IOTA = 'iota1qpwxxaw6fw8zeezefyqf0y7hnrpkcmfa4afc67ywfkpp3gwj0ttzcexhvan', SHIMMER = 'smr1qp0248uakdvfrhyr58yk5lswhnt033vrhst2j4c77laepdv2rk0psgh4t4x', TEST = 'rms1qp29ma9mugkrlaq9e60pmdray4sn2zjpet4vyk86cezm0jqpdwuhv68j3vh', diff --git a/packages/sdk/test/otr/otr.spec.ts b/packages/sdk/test/otr/otr.spec.ts index ed6a572d71..ee655c200b 100644 --- a/packages/sdk/test/otr/otr.spec.ts +++ b/packages/sdk/test/otr/otr.spec.ts @@ -1,11 +1,11 @@ import { Dataset } from '@build-5/interfaces'; import * as build5 from '../../src'; import { SoonaverseApiKey, Build5 } from '../../src/https'; -import { Build5OtrAddress } from '../../src/otr'; +import { SoonaverseOtrAddress } from '../../src/otr'; describe('', () => { it('Deep link test', async () => { - const otrAddress = Build5OtrAddress.TEST; + const otrAddress = SoonaverseOtrAddress.TEST; const request = build5.otr(otrAddress).dataset(Dataset.MEMBER).validateAddress(); const deeplink = request.getFireflyDeepLink();