diff --git a/packages/pas/Published.toml b/packages/pas/Published.toml new file mode 100644 index 0000000..36ded4a --- /dev/null +++ b/packages/pas/Published.toml @@ -0,0 +1,12 @@ +# Generated by Move +# This file contains metadata about published versions of this package in different environments +# This file SHOULD be committed to source control + +[published.testnet] +chain-id = "4c78adac" +published-at = "0x7e77592474ea9759b46ca5c6515ed4840952cd80d60ee54a1614382811d46730" +original-id = "0x7e77592474ea9759b46ca5c6515ed4840952cd80d60ee54a1614382811d46730" +version = 1 +toolchain-version = "1.66.1" +build-config = { flavor = "sui", edition = "2024" } +upgrade-capability = "0x902964d97a0597ea49e46d8c892ec2975be5c7df58f8a90658a2baa48b52e98c" diff --git a/packages/ptb/Published.toml b/packages/ptb/Published.toml new file mode 100644 index 0000000..bb2a185 --- /dev/null +++ b/packages/ptb/Published.toml @@ -0,0 +1,12 @@ +# Generated by Move +# This file contains metadata about published versions of this package in different environments +# This file SHOULD be committed to source control + +[published.testnet] +chain-id = "4c78adac" +published-at = "0x3533b60e937759b07a079224c1a4a43db92adbc8dbb8926bae6c4f5cc63aa786" +original-id = "0x3533b60e937759b07a079224c1a4a43db92adbc8dbb8926bae6c4f5cc63aa786" +version = 1 +toolchain-version = "1.66.1" +build-config = { flavor = "sui", edition = "2024" } +upgrade-capability = "0x8ffea97d51e63ede8ae4966f529ee01ef623de2fe692e1aa4c8f1c843b25f6cc" diff --git a/sdk/example-app/src/extension-example.ts b/sdk/example-app/src/extension-example.ts index 3564d2f..78cf54c 100644 --- a/sdk/example-app/src/extension-example.ts +++ b/sdk/example-app/src/extension-example.ts @@ -5,8 +5,8 @@ * Example demonstrating PAS SDK usage with the SDK v2.0 $extend pattern */ -const assetType = '0xbcd1cffae40317c7870e55c65af7fc20a8c46ce0ed1a1b24b1edf576480e2fa8::demo_usd::DEMO_USD'; -const demoAssetFaucet = '0x9d1fb399a8748a6afdd687a93c4c9303e6f7787c860d5e705136f7b979a3b4d7' +const assetType = '0xb17d2a779fa94b4c142ec9a84a00f177b9002853341e2d5540c0bdccdb2043fc::demo_usd::DEMO_USD'; +const demoAssetFaucet = '0x4c0fc221f8203f7887389e131b6ea3f77fdc7f54fafe31b1a36913352bd0957f' import { SuiGrpcClient } from '@mysten/sui/grpc'; import { decodeSuiPrivateKey, Signer } from '@mysten/sui/cryptography'; @@ -22,8 +22,8 @@ async function main(): Promise { const sender = getActiveKeypair().toSuiAddress(); const client = new SuiGrpcClient({ - network: 'devnet', - baseUrl: 'https://fullnode.devnet.sui.io:443', + network: 'testnet', + baseUrl: 'https://fullnode.testnet.sui.io:443', }).$extend(pas()); // await finalizeTestAssetSetup(client); diff --git a/sdk/pas/src/client.ts b/sdk/pas/src/client.ts index 672a467..7f3a134 100644 --- a/sdk/pas/src/client.ts +++ b/sdk/pas/src/client.ts @@ -4,7 +4,6 @@ import type { ClientWithCoreApi } from '@mysten/sui/client'; import { - DEVNET_PAS_PACKAGE_CONFIG, MAINNET_PAS_PACKAGE_CONFIG, TESTNET_PAS_PACKAGE_CONFIG, } from './constants.js'; @@ -64,7 +63,6 @@ export function pas({ export class PASClient { #packageConfig: PASPackageConfig; - #suiClient: ClientWithCoreApi; constructor(config: PASClientConfig) { const network = config.suiClient.network; @@ -76,17 +74,12 @@ export class PASClient { case 'mainnet': this.#packageConfig = MAINNET_PAS_PACKAGE_CONFIG; break; - case 'devnet': - this.#packageConfig = DEVNET_PAS_PACKAGE_CONFIG; - break; default: throw new PASClientError(`Unsupported network: ${network}`); } } else { this.#packageConfig = config.packageConfig!; } - - this.#suiClient = config.suiClient; } /** @@ -96,13 +89,6 @@ export class PASClient { return this.#packageConfig; } - /** - * Get the Sui client instance - */ - getSuiClient(): ClientWithCoreApi { - return this.#suiClient; - } - /** * Derives the account address for a given owner address. * diff --git a/sdk/pas/src/constants.ts b/sdk/pas/src/constants.ts index ffeb65e..0dcb8a1 100644 --- a/sdk/pas/src/constants.ts +++ b/sdk/pas/src/constants.ts @@ -4,17 +4,11 @@ import type { PASPackageConfig } from './types.js'; export const TESTNET_PAS_PACKAGE_CONFIG: PASPackageConfig = { - packageId: '0x0', // TODO: Replace with actual testnet package ID - namespaceId: '0x0', // TODO: Replace with actual testnet namespace ID + packageId: '0x7e77592474ea9759b46ca5c6515ed4840952cd80d60ee54a1614382811d46730', + namespaceId: '0xf7c77ac8bbbdf47f7b1cf8ac8aa489cfc4dff25847f3e2e1db53bde5c454be2b', }; export const MAINNET_PAS_PACKAGE_CONFIG: PASPackageConfig = { packageId: '0x0', // TODO: Replace with actual mainnet package ID namespaceId: '0x0', // TODO: Replace with actual mainnet namespace ID }; - -// TODO: Remove devnet when going live with the client. -export const DEVNET_PAS_PACKAGE_CONFIG: PASPackageConfig = { - packageId: '0xcb8c93eab81b9a4f0cb48382962cdac0f16767a23ae81e5f7c4c44690afd4f2a', - namespaceId: '0xf7cb5378eefb861af87eaa9c621e29d7f061a6f3919d241502dc1549b7718a1c', -}; diff --git a/sdk/pas/src/index.ts b/sdk/pas/src/index.ts index 81e0bf5..03d64ea 100644 --- a/sdk/pas/src/index.ts +++ b/sdk/pas/src/index.ts @@ -6,6 +6,5 @@ export type { PASClientConfig, PASPackageConfig, PASOptions } from './types.js'; export { TESTNET_PAS_PACKAGE_CONFIG, MAINNET_PAS_PACKAGE_CONFIG, - DEVNET_PAS_PACKAGE_CONFIG, } from './constants.js'; export * from './error.js';