For the complete documentation index, see llms.txt. This page is also available as Markdown.

Fiat Deposit From USDC

This example shows how to deposit USDC from the Arbitrum Network, which is converted to USD on Keeta. It assumes KYC has already been completed and shared with the Anchor. See the two KYC guides Add KYC Certificate and Share KYC Attributes for more details on handling KYC.

To run the example on the main network, the following changes are needed.

  • Change network from test to main

  • Use the main network Keeta USD Token - keeta_amnkge74xitii5dsobstldatv3irmyimujfjotftx7plaaaseam4bntb7wnna

  • Use the main Arbitrum Network USDC Contract - 0xaf88d065e77c8cC2239327C5EDb3A432268e5831

  • Use the main Arbitrum Chain ID - 42161

1

Setup Account and Anchor Client

2

Establish Source Location and Destination

In this example the source is the Arbitrum USDC contract and destination is the Keeta USD Token on the Test Network. This establishes the asset pair that will be used for the transfer.

3

Identify Provider with Anchor Resolver

Use the Asset Movement Anchor Client to identify providers that can handle the transfer.

// Find Asset Movement providers that support Arbitrum => Keeta USD
const providers = await assetMovementClient.getProvidersForTransfer({
	// USDC (Arbitrum) => USD (Keeta)
	asset: ASSET_PAIR,
	// Source: Arbitrum
	from: {
		type: 'chain',
		chain: {
			type: 'evm',
			chainId: ARBITRUM_CHAIN_ID
		}
	},
	// Destination: Keeta Network
	to: {
		type: 'chain',
		chain: {
			type: 'keeta',
			networkId: userClient.network
		}
	}
});
4

Create Persistent Deposit Address

A persistent deposit address is an account on another cryptocurrency network that automatically transfers tokens deposited on the other network to equivalent Keeta tokens.

const persistentAddressResponse = await providers[0].createPersistentForwardingAddress({
	account: userAccount,
	asset: ASSET_PAIR,
	sourceLocation: {
		type: 'chain',
		chain: { type: 'evm', chainId: ARBITRUM_CHAIN_ID }
	},
	destinationLocation: {
		type: 'chain',
		chain: { type: 'keeta', networkId: userClient.network }
	},
	destinationAddress: userAccount.publicKeyString.get()
});

console.log(persistentAddressResponse.address);
5

Deposit USDC Funds

On the TEST network, funds can be deposited to the address returned from the previous step using any Arbitrum wallet connected to the test (Sepolia) network. Alternatively, Circle's faucet https://faucet.circle.com/ can be used to deposit USDC using Arbitrum Sepolia.

6

List Anchor Transactions

The Anchor will show transactions for a given account and can be used to identify when the new transaction has been completed.

7

Check Keeta Account History

Another method to verify the transaction has completed is to check the account history on Keeta.

Full Code Example

https://github.com/KeetaNetwork/keetanet-examples/blob/main/src/anchor/asset-movement-fiat-deposit-from-crypto.ts

Last updated