Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/pas/Published.toml
Original file line number Diff line number Diff line change
@@ -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"
12 changes: 12 additions & 0 deletions packages/ptb/Published.toml
Original file line number Diff line number Diff line change
@@ -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"
8 changes: 4 additions & 4 deletions sdk/example-app/src/extension-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -22,8 +22,8 @@ async function main(): Promise<void> {
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);
Expand Down
14 changes: 0 additions & 14 deletions sdk/pas/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -64,7 +63,6 @@ export function pas<const Name extends string = 'pas'>({

export class PASClient {
#packageConfig: PASPackageConfig;
#suiClient: ClientWithCoreApi;

constructor(config: PASClientConfig) {
const network = config.suiClient.network;
Expand All @@ -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;
}

/**
Expand All @@ -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.
*
Expand Down
10 changes: 2 additions & 8 deletions sdk/pas/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
};
1 change: 0 additions & 1 deletion sdk/pas/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Loading