Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
57254ac
Revert "[script-composer] Revert script composers (#574)"
runtian-zhou Nov 20, 2024
3102c3f
update deps
runtian-zhou Nov 20, 2024
f931d81
tag version
0xmaayan Nov 21, 2024
8990e25
Update package.json
runtian-zhou Dec 5, 2024
8ac1128
bump version
0xmaayan Dec 5, 2024
26390ed
Update build.ts
runtian-zhou Dec 11, 2024
62644a7
bump
kaw2k Sep 27, 2024
bd7a7ef
export abstractedaccount
chiumax Oct 7, 2024
531b449
starts to add static function to generate account from private key
kaw2k Oct 7, 2024
11bcd1b
Adds watch script
kaw2k Oct 8, 2024
3ddb2ad
starts to modify example
kaw2k Oct 8, 2024
fd720fc
Adds new test file to the ts-sdk
kaw2k Oct 11, 2024
0ef8e68
Cleans up test file
kaw2k Oct 11, 2024
f7b42c0
Messing with tests
kaw2k Oct 15, 2024
fb0b08f
bump
kaw2k Oct 15, 2024
8df1455
Tests working again
kaw2k Oct 16, 2024
d2b8264
Light test refactoring
kaw2k Oct 16, 2024
a54b1c0
Adds viewing balance and permissions test
kaw2k Oct 16, 2024
19fd358
Refactors tests for granting multiple permissions
kaw2k Nov 4, 2024
c575883
Updates to the test case
kaw2k Nov 5, 2024
13157fd
Permissioned Accounts (#594)
chiumax Dec 10, 2024
79ed37e
Converts permissions to a serializable class (#604)
kaw2k Dec 16, 2024
03e4979
Normalizes amount to bigint (#608)
kaw2k Dec 16, 2024
c388ca7
Adds more testcases
kaw2k Dec 19, 2024
d08e284
Removes batched intents in favor of script composer
kaw2k Dec 19, 2024
d65e3c9
removes dead import
kaw2k Dec 19, 2024
3ae6cda
Adds abstract parent class to permissions
kaw2k Jan 6, 2025
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
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ All notable changes to the Aptos TypeScript SDK will be captured in this file. T
# 1.32.1 (2024-11-11)

- Add support for Firebase issuers in the `updateFederatedKeylessJwkSetTransaction` function
- [`Breaking`] Revert new `scriptComposer` api in transactionSubmission api to allower SDK callers to invoke multiple Move functions inside a same transaction and compose the calls dynamically.

# 1.32.0 (2024-11-08)

Expand Down
93 changes: 93 additions & 0 deletions examples/typescript/keyless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,96 @@ const example = async () => {
};

example();

// const testPermissioned = () => {

// const subAccount = AbstractedEd25519Account.generate();

// const receiverAccounts = [Account.generate(), Account.generate()];

// console.log('singleSignerED25519SenderAccount', activeAccount.address.toString());
// console.log('singleSignerAbstractionSenderAccount', subAccount.accountAddress.toString());
// console.log(
// 'receiverAccounts',
// receiverAccounts.map((a) => a.accountAddress.toString()),
// );

// console.log('batcharg', BatchArgument);
// console.log('batcharg', BatchArgument.new_signer(0));

// // fund accounts
// await aptos.fundAccount({ accountAddress: activeAccount.address, amount: 100_000_000 });
// console.log('-----');
// await aptos.fundAccount({
// accountAddress: subAccount.accountAddress,
// amount: 100_000_000,
// });

// console.log('=====================');
// console.log('activeAccount', activeAccount.address.toString());
// console.log('activeSigner', activeSigner.accountAddress.toString());
// console.log('=====================');

// // step 1: setup.
// const transaction = await aptos.transaction.build.batched_intents({
// builder: async (builder) => {
// // convert apt to fa
// await builder.add_batched_calls({
// function: '0x1::coin::migrate_to_fungible_store',
// functionArguments: [BatchArgument.new_signer(0)],
// typeArguments: ['0x1::aptos_coin::AptosCoin'],
// });
// // set up aa with permissioned signer
// const permissioned_signer_handle = await builder.add_batched_calls({
// function: '0x1::permissioned_signer::create_permissioned_handle',
// functionArguments: [BatchArgument.new_signer(0)],
// typeArguments: [],
// });
// const permissioned_signer = await builder.add_batched_calls({
// function: '0x1::permissioned_signer::signer_from_permissioned',
// functionArguments: [permissioned_signer_handle[0].borrow()],
// typeArguments: [],
// });
// await builder.add_batched_calls({
// function: '0x1::fungible_asset::grant_permission',
// functionArguments: [
// BatchArgument.new_signer(0),
// permissioned_signer[0].borrow(),
// AccountAddress.A,
// 10 /* limit */,
// ],
// typeArguments: [],
// });
// await builder.add_batched_calls({
// function: '0x1::permissioned_delegation::add_permissioned_handle',
// functionArguments: [
// BatchArgument.new_signer(0),
// subAccount.publicKey.toUint8Array(),
// permissioned_signer_handle[0],
// ],
// typeArguments: [],
// });
// await builder.add_batched_calls({
// function: '0x1::lite_account::add_dispatchable_authentication_function',
// functionArguments: [
// BatchArgument.new_signer(0),
// AccountAddress.ONE,
// new MoveString('permissioned_delegation'),
// new MoveString('authenticate'),
// ],
// typeArguments: [],
// });
// return builder;
// },
// sender: activeAccount.address,
// });

// const response = await aptos.signAndSubmitTransaction({
// signer: activeSigner,
// transaction,
// });
// await aptos.waitForTransaction({
// transactionHash: response.hash,
// });

// }
5 changes: 3 additions & 2 deletions examples/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"your_fungible_asset": "ts-node your_fungible_asset.ts",
"federated_keyless": "ts-node federated_keyless.ts",
"jwk_update": "ts-node jwk_update.ts",
"keyless": "ts-node keyless.ts",
"keyless": "tsx keyless.ts",
"keyless_mainnet": "ts-node keyless_mainnet.ts",
"local_node": "ts-node local_node.ts",
"test": "run-s simple_transfer multi_agent_transfer simple_sponsored_transaction transfer_coin custom_client publish_package_from_filepath external_signing sign_struct publish_package_from_filepath external_signing your_coin your_fungible_asset"
Expand All @@ -32,7 +32,8 @@
"dotenv": "^16.3.1",
"npm-run-all": "latest",
"readline-sync": "^1.4.10",
"superagent": "^8.1.2"
"superagent": "^8.1.2",
"tsx": "^4.19.1"
},
"peerDependencies": {
"@aptos-labs/ts-sdk": "link:../.."
Expand Down
Loading
Loading